|
Situation: I am currently dealing with a network game where the player has several statistics like how many bombs he still has, how many lives, etc. Can I synchronize this complete 'Player' Component with all its variables via State Synchronisation? Research: The documentation seems to be unclear on this. From http://unity3d.com/support/documentation/Components/net-StateSynchronization.html
However, BitStream.Serialize(), used within OnSerializeNetworkView(BitStream stream, NetworkMessageInfo info), only handles a certain amount of datatypes (int, string, Vector3 etc). Question: Am I allowed to just grab a component and synchronize this AS A WHOLE? (so in my case ALL the public vars hanging within my 'Player' Component) If not, how do I utilize OnSerializeNetworkView() in such a way that if I send 'available bombs' for instance from the server, the client KNOWS it's receiving 'available bombs' and not 'number of lives' for instance? Thanks in advance :)
(comments are locked)
|
