You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Add a Basis Scene component to the an empty Gameobject, enter an Asset Bundle Name and press the 'Create Scene Bee File' button. Store it in a remote server.
135
+
- Add a Basis Scene component to an empty Gameobject, enter an Asset Bundle Name and press the 'Create Scene Bee File' button. Store it in a remote server.
136
136
137
137
<Callouttype="info">
138
138
You should disable or remove the canvas object from the scene. This is because keeping it active will result in two copies of it existing in the scene later: one copy from the scene itself and another generated by the XML.
@@ -154,4 +154,85 @@ You should disable or remove the canvas object from the scene. This is because k
154
154
155
155
- Click the button and the TMP text object should update the count after each button click for both local and remote players.
156
156
157
-

157
+

158
+
159
+
## How to Add Network Syncing Scripts Via Cilbox
160
+
161
+
The Cilbox CIL can be used to create scripts that work in runtime. Currently, Cilbox is still quite experimental. The following example shows how to create a script to make a cube rotate using Cilbox.
162
+
163
+
- Create a cube object and an ObjectRotator component to attach to it. Make sure to add [Cilboxable] above your class.

181
+
182
+
- Create an empty Gameobject and attach a Cilbox Basis Scene component to it. The Cilbox Basis Scene becomes the cilbox that all your scripts run in.
183
+
184
+
<Callouttype="info">
185
+
Note: If your editor can't detect the Cilbox namespace, you can either create your own .asmdef file and reference Cilbox, or simply open the Cilbox asmdef and select *Auto Referenced* to resolve this.
186
+
187
+

- Add a Basis Scene component to an empty Gameobject, enter an Asset Bundle Name and press the 'Create Scene Bee File' button. Store it in a remote server.
193
+
194
+

- When you run the scene in playmode, your created script will be compiled by Unity normally. However, before actually being able to play, the scripts are swapped out by a Cilbox Proxy component. These are what actually execute as components during runtime. Basis uses its copy of Cilbox Proxy and Cilbox Basis Scene instead of yours, but your data gets serialized.
199
+
200
+
201
+

202
+
203
+

204
+
205
+

206
+
207
+
- Run the Initialization scene and test your Cilbox script in the app. The cube should rotate.
208
+
209
+

210
+
211
+
Here is an additional example using shaders which you can try.
0 commit comments