- Home /
 
Multiplayer objects isn't equals.
I did a simple multiplayer with spawning some "players". So, all working well. But only players objects are syncing. Other objects isn't equal. For example: if 1st player will move some cube, other player will not see that. How can I fix it?
Answer by YoungDeveloper · Jul 11, 2014 at 10:18 PM
How exactly you are sending movement information?
If you don't want to share necessary information, then sort your problems yourself.
it's not secret.
     void OnSerializeNetworkView(BitStream stream, Network$$anonymous$$essageInfo info) {
                 if (stream.isWriting) {
                     Vector3 pos = transform.position;
                     stream.Serialize(ref pos);
                 }
                 else {
                     Vector3 posRec = transform.position;
                     stream.Serialize(ref posRec);
                     transform.position = posRec;
                 }
             }
     
 
                  also in Update Function:
 if (networkView.is$$anonymous$$ine) { movement }
 
 
                  So only one player has enabled networkView and can controll only 1 character.
Your answer
 
             Follow this Question
Related Questions
Unity networking tutorial? 6 Answers
Can I add a network prefab at runtime? 1 Answer
Animation & sound over network 1 Answer
Syncing terrain over Network 0 Answers
NetworkTransform not interpolating? 0 Answers