How to synchronize a game object/variable across clients?

Hi,

I have a problem, how do I synchronize a game object/variable across clients?

I have a cube that I want to set active false/true based on game events.
Is there a way to do this like in photon case?
If not, there is a way to synchronize a variable called SyncInt?
The server should keep the value of SyncInt and when a client connects the value is sent to all client, When a client modifies the value, it sends an event to the server and the server broadcasts to all clients that the value of SyncInt has changed and all clients have to react .

Thanks

You would use IntValue or BoolValue (note BoolValue currently has a bug in the Changed event where the new / old value are reversed and is fixed in 0.6)

1 Like