Photon Unity Networking: Scene Objects
<p>Im having a big problem using Photon PUN networking with Unity multiplayer game.</p>

<p>The Master Client receives a list of networked SCENE objects to create from the server.</p>

<p>The Master Client creates all the scene objects ONCE like this psudo code</p>

<pre><code>void OnLevelLoaded()
{
   if (MasterClient) {
     for (i=0; i&lt;object.Count; i++) {
       PhotonNetworking.InstantiateSceneObject(object[i],....)
     }
   }
   CreatePlayer();
}
</code></pre>

<p>When other players join the room, the server (or some other entity, dont know who) automatically creates those same networked scene objects on the client players.</p>

<p>Lets say a player picks up a scene object, the master client sends this as a buffered RPC to all clients so that they can pick it up too.</p>

<p>PROBLEM: When new player joins, he immediately gets a bunch of RPC calls to pick up objects, even when the scene objects are not yet instantiated automatically by the server, so of course the RPC cant find the objects since they are not created yet, and the program fails.</p>

<p>If there was someway the server could instantiate the scene objects first, then send the RPC it would be great, but i dont know how to control that, it seems to be done behind the scenes automatically.</p>

<p>Anybody knows how I can fix this problem? Im so desperate, I been searching for answer for two days.</p>

<p>Thanks</p>