#LoadGlobalScenes starts two queues

12 messages · Page 1 of 1 (latest)

cinder cypress
#

Here is my code loading a scene:

SceneLoadData sld = new SceneLoadData(levelName)
{
    ReplaceScenes = ReplaceOption.All
};
InstanceFinder.SceneManager.OnQueueEnd += SceneManager_OnQueueEnd;
InstanceFinder.SceneManager.LoadGlobalScenes(sld);

However, this code ends up starting a queue for unloading the scene, and then another for loading the scene. I have this code:

public void SceneManager_OnQueueStart()
{
    Debug.LogError("QUEUE START");
}

public void SceneManager_OnQueueEnd()
{
    Debug.Log("QUEUE END");
}

Both "QUEUE START" and "QUEUE END" log twice on the client. Is this a bug or intended?

jaunty turret
#

Does this happen like:
QUEUE START
QUEUE START
QUEUE END
QUEUE END,
or
QUEUE START
QUEUE END
QUEUE START
QUEUE END
?

daring egret
#

I got that same problem. I get
Qstart
Qstart
LStart
LStart
LEnd
LENd
QEnd
QEnd

jaunty turret
#

It sounds like it's just posting it once for server and once for client, or is this not happening on a listen server?

daring egret
#

I get it like that twice, once for server and another for client

#

I added the AsServer on the load and you can see that it runs at doubles for server and then runs again at doubled for client

#

QueuStart doenst have information regarding if it's server or client that I could show 😦

jaunty turret
#

Ah I see, that's interesting. Does this only happen when loading with Replace scenes enabled?

daring egret
#

good question, dont know :S
I jsut loaded teh global scene

cinder cypress
#

but im pretty sure its just on the server