c# - How do I sync a script over Photon Network in Unity? -


i have created game class handles transactions of game (whose turn is, items each person has, etc). create 1 of these objects , keep synced between both clients of photon unity network.

first tried instantiating prefab on photon network instantiatesceneobject() , changing attached script. prefab found on both clients, attached game script null on 1 of players.

after tried adding game class hashtable , calling

 photonnetwork.room.setcustomproperties(new exitgames.client.photon.hashtable() { { "game", g } }); 

but when attach debugger unity, notice script hangs @ line. doesn't move on next line of code.

i hoping don't have send every object of game class rpc. seems tedious. appreciated.


Comments