I have a question regarding networking in unity3d . I destroyed an object from my multiplayer game by calling Network.Destroy(GetComponent(NetworkView).viewID) (I do have a network view attached to the object). This the object was successfully destroyed from the clients as well as the server. However, if a new client is connected, this object that was destroyed will appear in his scene. So basically if i destroy an object from the network and than a new client connects after this object is destroyed he can see the object... Any help would be greatly appreciated?
1 Answer
1If you used Network.Instantiate() or your own instantiate RPCs from the client then make sure to call RemoveRPCs() with the network.player that did the instantiations. If you used the server to instantiate the objects it becomes a little more difficult and you need to put all the different Network.players on different groups so that you can RemoveRPCs() by group number and not player number.