So if i have 4 players connected ( 1 server 3 clients ), and lets say i change color of second player, how can i applay that change to be visible on other clients and server.
Networking is a broad topic, but here’s the basic step by step for what you’re asking
- Attach your colour changing script and network view to your object that is changing colour
- Set the ‘Observed’ field of the network view component to be the colour change script, by dragging the script component onto ‘Observed’. Let me know if this step isn’t clear
- In your colour change script, add a new function called OnNetworkSerializeView, as explained here Unity - Scripting API: Network.OnSerializeNetworkView(BitStream,NetworkMessageInfo)
- Serialize each of the values you want to synchronise across the network. In this case you’ll be wanting to send the colour, probably as a Vector3
Assuming you change the colour of the object from the network owner of the object, this will synchronise the colour across all connected clients.