Unity Instructions
This commit is contained in:
parent
351348a9d2
commit
f7926482d3
BIN
Client/Unity/InstructionalImages/clientobjectsetup.png
Normal file
BIN
Client/Unity/InstructionalImages/clientobjectsetup.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 64 KiB |
BIN
Client/Unity/InstructionalImages/ineditor.png
Normal file
BIN
Client/Unity/InstructionalImages/ineditor.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 90 KiB |
BIN
Client/Unity/InstructionalImages/ipchange.png
Normal file
BIN
Client/Unity/InstructionalImages/ipchange.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 39 KiB |
BIN
Client/Unity/InstructionalImages/scheduling.png
Normal file
BIN
Client/Unity/InstructionalImages/scheduling.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
37
Client/Unity/README.md
Normal file
37
Client/Unity/README.md
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
# Unity Setup
|
||||||
|
First, set the ip of the csnc compatible server.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Then schedule the GameObjectRegistry script to be\
|
||||||
|
(Go To: Edit / Project Settings / Script Execution Order)
|
||||||
|
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
then add the CSNC prefab to your scene
|
||||||
|
|
||||||
|
from here you can add references to the models that you want to synchronize across projects as per the image
|
||||||
|
|
||||||
|
(these are references to models that will be shown on the client, but controlled by another players client)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
take note that the objects are children of the CSNC prefab and they are not enabled
|
||||||
|
|
||||||
|
in addition to this, the objects under CSNC have NO behaviour scripts attached to them, this is important because it may cause desynchronization if you dont know what you're doing
|
||||||
|
|
||||||
|
## Client Controlled GameObjects
|
||||||
|
|
||||||
|
Now that you have set up CSNC you can start adding client controlled GameObjects
|
||||||
|
|
||||||
|
it is quite trivial to add new Client Synchronized GameObjects, simply attach the "Client Sync Behavior" component to the gameobject you want to sync
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
As you can see, the client sync behavior is attached to the gameobject and given the id "razorblade" \
|
||||||
|
(remember what you entered earlier from when we set up the game object registry)
|
||||||
|
|
||||||
|
### Congratulations!!
|
||||||
|
And thats it!! once you have set this up the two gameobjects will be synchronized across clients (assuming you have set up the server - side)
|
Loading…
x
Reference in New Issue
Block a user