Networking - Syncing color for all clients
Hi, I have a ground made up of cubes and when the players walk over them, the change colour. One player is blue, the other is green. When the green player walks over a cube, I want it to change to green across the whole network, and I want the same to happen for blue.
I have a script which detects collisions and changes the colour accordingly, but I am struggling to make this colour change sync across the network.
I have a feeling that [SyncVar] is important in this, but I have no idea how to implement this.
Thanks for your help in advance! My code is in C#
Your answer
Follow this Question
Related Questions
Networking - Syncing an integer 0 Answers
How to use SyncListStruct properly? 0 Answers
SyncVar gives the error Failure generating network code 1 Answer
syncvar not changing after command 0 Answers
What's wrong with my script ? 0 Answers