|
So here is my question: I have a level whith multiple GameObjects each oh which has NetworkView attached. When I do RPC call to load the level for several players will all these NetworkViewed objects be in sync? I mean whether Network.Instantiate is used to instantiate game objects whith NetworkView attached when level loads???
(comments are locked)
|
|
No. Only if you use Network.Instantiate the objects will know that they are the same instance and sync state. So it looks like I have to instantiate all interactive objects (like power-ups, enemies etc.) manualy for multiplayer game, right?
Oct 26 '10 at 08:26 AM
Anton Petrov
@spree-1: That's not true! GameObjects with NetworkViews that are part of a scene have their ViewIDs serialized along with the scene. If two clients load the same scene they are automatically in synch. I never use Network.Instantiate because you have almost no control over the deletion of the objects. Scene NetworkViewIDs have it's own id range so they don't interfere with dynamically created IDs. However they can interfere with other scene IDs, but that's no problem as long as all clients use the same scene. If you load a new scene at runtime you can and should use SetLevelPrefix to prefix all scene NetworkViewIDs.
May 20 '12 at 12:20 AM
Bunny83
(comments are locked)
|

I'm having a similar issue. When my client connects, I want it to load all currently instantiated objects on the server side. For this I am trying to use the code here: http://unity3d.com/support/documentation/Components/net-NetworkLevelLoad.html
However, the client is not loading any objects that have been Network.Instantiate()d before my client connected.
Thanks,