Networking question....

if I have a few GO’s in my level (lets call them boxes for now) that is basically an empty GO with 3 other GO’s parented to it. Each GO is a different size box, with a different color… lets say Red, Green Blue.

And I want to turn on/off the correct boxes to show the correct “state”. As in, all now green, or just 1 red and the rest blue. etc

I want to be able to tell all machines connected to my game to switch that box to the correct state.

Is this a s simple as adding a network view on the prefab, and having it watch a script that I send messages to? so if I change the state on the “server” the network view will change it on the clients? Is there an easier way? or better way?

Is it simply enough to just have network views on each box and set them to unreliable state sync?

This sounds like you want to use an RPC call. Only the recipient of the RPC function needs to have the NetworkView attached (StateSync Off, Observed None).

You would likely want a single RPC that you tell “change these boxes to these colors”, and send the call once, rather than having an RPC on each box and sending 3 calls over the network.

Unreliable State Sync would be the worst performance option in this case - it would send the current state of the object 15 times per second (which is the default), even if nothings changed. Reliable Delta Compressed only sends an update when a change has occurred.

You might want to take a look at the Minimizing Bandwidth section in the manual.
file:///Applications/Unity/Unity.app/Contents/Documentation/Documentation/Components/net-MinimizingBandwidth.html

Thanks Shaun… RPC calls are definitely the go here… I didnt realise that “unreliable” was so taxing on the network bandwidth. I was using this for every wheel on every car in the game (up to 40 wheels) but that would be a massive amount of data going round.

I have now changed my wheels to be a bit cleverer in that if they are network wheels, then just calc the rotation from the network cars rigidbody velocity. Now there are NO network calls for the wheels at all. :slight_smile:

Nice one :slight_smile: I’m guessing you mean the networked version of StuntMania? I’m looking forward to seeing that - the single player version was addictive!

Well, its not quite networked StuntMANIA… it will be a whole new game, but using the car/stunt premis with a whole new gameplay style.