- Home /
Question by
TruffelsAndOranges · Dec 21, 2015 at 10:13 PM ·
scenescene-loadingscene load
GameObject.FindObjectOfType not working in Unity 5.3 multiscenes?
I basically do this:
SceneManager.LoadScene("GlobalScene", LoadSceneMode.Additive);
Scene globalScene = SceneManager.GetSceneByName("GlobalScene");
Scene currentScene = SceneManager.GetActiveScene();
SceneManager.SetActiveScene(globalScene);
_instance = GameObject.FindObjectOfType<Manager>();
Debug.Log(_instance);
SceneManager.SetActiveScene(currentScene);
... and _instance is null; even if I can see that the Manager-object exists in the hierarchy of the "GlobalScene" scene. I do all this from a static method, if that is of any problem?
Thing is, I'm trying to set a singleton Manager that automatically loads and instantiates if it's not already loaded, but currently I can't seem to find a way to communicate between the additive scenes.
This worked in earlier Unity versions tho.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612053442im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple scenes 2 Answers
Unity Scene loading problem (slow loading until it freezes) 0 Answers
Load Scene from .unity File 1 Answer
Is there any ideas to load Unity scene asynchronously? 1 Answer