diff --git a/Client/Unity/InstructionalImages/clientobjectsetup.png b/Client/Unity/InstructionalImages/clientobjectsetup.png new file mode 100644 index 0000000..37751f7 Binary files /dev/null and b/Client/Unity/InstructionalImages/clientobjectsetup.png differ diff --git a/Client/Unity/InstructionalImages/ineditor.png b/Client/Unity/InstructionalImages/ineditor.png new file mode 100644 index 0000000..33f88c6 Binary files /dev/null and b/Client/Unity/InstructionalImages/ineditor.png differ diff --git a/Client/Unity/InstructionalImages/ipchange.png b/Client/Unity/InstructionalImages/ipchange.png new file mode 100644 index 0000000..222fe9a Binary files /dev/null and b/Client/Unity/InstructionalImages/ipchange.png differ diff --git a/Client/Unity/InstructionalImages/scheduling.png b/Client/Unity/InstructionalImages/scheduling.png new file mode 100644 index 0000000..36267ed Binary files /dev/null and b/Client/Unity/InstructionalImages/scheduling.png differ diff --git a/Client/Unity/README.md b/Client/Unity/README.md new file mode 100644 index 0000000..8757256 --- /dev/null +++ b/Client/Unity/README.md @@ -0,0 +1,37 @@ +# Unity Setup +First, set the ip of the csnc compatible server. + +![image](./InstructionalImages/ipchange.png) + +Then schedule the GameObjectRegistry script to be\ +(Go To: Edit / Project Settings / Script Execution Order) + + +![image](./InstructionalImages/scheduling.png) + + +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](./InstructionalImages/ineditor.png) + +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](./InstructionalImages/clientobjectsetup.png) + +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) \ No newline at end of file