Hey hey
We are currently working on something like a permanent scene, one that can be loaded without settings, added to the current scene and which will persist throughout scene changes. This already works fine, we have some general manager scripts in it and we are able to properly use them everywhere.
The only issue lies in the scene in which we actually do add this permanent scene. Since loading the permanent scene takes some time, it will not be in place before the initialize
method of script is executed.
@createScript("LoadPermanentScene")
export class LoadPermanentScene extends ScriptTypeBase
{
constructor()
{
super();
// This way this method will be executed on instantiation instead of on initialization. It is still too slow
// and the promise will only resolve after postInitialize.
this.tryLoadPermanentScene();
}
private static permanentSceneName = "Permanent";
private tryLoadPermanentScene(): Promise<void>
{
if (SceneLoadingManager.isSceneLoaded(LoadPermanentScene.permanentSceneName)) return;
SceneLoadingManager.loadPermanentScene(LoadPermanentScene.permanentSceneName);
}
}
So my Question is, is there a way to delay the start
of the application? As far as I saw it, it is already waiting for the asset registry to finish preloading. Is there a way to delay it even longer, to load another scene hierarchy and add it to the root entity?
Thanks