hi,
i need help after one long day of brainstorming!
1 server 2 client.
onServerInitialized => network.instantiate(cube);
onPlayerConnected : sendRPC only to him to execute the network.instantiate(cube)
Cube : prefab with networkview on Unreliable, observing the script attached containing this :
void OnSerializeNetworkView(BitStream stream, NetworkMessageInfo info){
if(stream.isWriting) { //so, if i am the owner, i send my position and other things : y, actualweapon, life,..
_x = myLocalPlayerPrefab.transform.position.x
stream.Serialize(ref _x);
} else { //if i am not the owner, place the cube where the other player tell me he is (the cube will be after another player model)
stream.Serialize(ref _x);
transform.position.x = _x; //place the cube where the other player supposed to be.
}
}
with 2 players (the server and the client), there is no problem!
but when an other player connect, there are 3 cube but it’s like 2 cube have the same position.
someone understood what i said?
thank you!!