..
2025-01-02 16:23:05 -05:00
2025-01-02 16:21:58 -05:00
2025-01-02 18:21:48 -05:00
2025-01-02 16:22:08 -05:00
2025-01-02 18:21:58 -05:00
2025-01-02 18:22:03 -05:00
2025-01-02 18:22:20 -05:00
2025-01-03 05:42:03 +00:00
2025-01-02 16:22:35 -05:00

Unity Setup

First, set the ip of the csnc compatible server.
(it needs to be formatted as such http://192.51.100.123:1234/ or http://mydomain.tld:1234/) image

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

image

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)

image

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

image

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)