- Home /
AsyncOperation.allowSceneActivation is actually static?
I have a large scene that takes a while to load, and I want to preload it while the user is navigating in the menus (which are also multiple scenes).
Lets say the scenes are called MenuScene1, MenuScene2 and BigScene and all add their content additively.
In MenuScene1 I execute the code
globalOperation = SceneManager.LoadScene("BigScene", LoadSceneMode.Additive)
globalOperation.allowSceneActivation = false;
And then I later transition to MenuScene2 with
SceneManager.LoadScene("MenuScene2", LoadSceneMode.Additive)
And when I am ready to transition to the big scene in MenuScene2 I do
globalOperation.allowSceneActivation = true;
However, when I do this, MenuScene2 doesn't load! It seems that setting allowSceneActivation = false on one scene loading operation applies this to every scene in the game. Is this intentional behaviour? Is this a bug? How am I supposed to preload large scenes if there are still scene navigation actions that have to be performed before I want to activate the large scene?
Your answer
Follow this Question
Related Questions
Capture reference to recently loaded scene asycn 0 Answers
Loading scene with LoadSceneAsync freezes and progress jumps from 0% to 90% 2 Answers
Updating text while loading a scene (async) 0 Answers
AsyncOperation activating immediately even with async.allowSceneActivation = false; 0 Answers
How to use AsyncOperation.completed? 1 Answer