Quantcast
Channel: Recent Discussions — Photon Engine
Viewing all articles
Browse latest Browse all 15755

PhotonNetwork.Instantiate / Different Scenes

$
0
0
Hi guys,

We have a very special situation here we need a little advice for.

Unfortunately we have the situation were a PhotonNetwork.Instantiate call can be received by another player which is in a difference scene already. (this is by design, so player A can switch to scene X when player B is still in scene Y). We can't change this as this is more or less a requirement. (though it doesn't fit the photon way of doings things perfectly).

As we mostly use scene local game objects with corresponding photon views, RPCs sent to those objects are not a problem on scene switches because they simply don't exists anymore then.

But obviously not so for PhotonNetwork.Instantiate as this call doesn't work on a photonView but globally.

Now my question, is there any way to discard the received instantiate call on a client if the scene is not correct? (correct or not correct scene can/should be checked locally when the call is received).

Basically we would need something like this:

virtual OnInstantiateNetworkObject(...)
{
if (sceneIsWrong)
return;

base.OnInstantiateNetworkObject(...);
}



Viewing all articles
Browse latest Browse all 15755

Trending Articles