Hi there community.
We have the following problem with our project: (using Unity 4.6.9)
After visiting a certain scene and calling Application.LoadLevelAdditive afterwards, we try to access the root object of the newly added scene with FindObjectOfType. The Problem is, no object can be found for some scenes.
Strange part is, everything works in editor, on android and it worked this way for a long time on iOS as well.
We have been working on this game for several years now and haven’t changed this method.
Strangest part is, everything works fine before we visit the cursed scene.
So somehow after loading this cursed scene (maybe too much stuff in memory?) Application.LoadLevelAdditive fails to create the GameObjects of some of the loaded scenes.
We tested with different devices, and to make it even more strange: On our fastest device (IPad Air2) everything works.
No exception can be found in the Load level action, there only is a null reference as soon as we try to access the object we were expecting to find afterwards.
We tried adding a wait coroutine until the object is loaded, but after 5 minutes there still was nothing to be found.
I have little hope that anyone can help as this is as specific and strange as it gets.
-Visiting a scene
-Coming back from that scene
-Application.LoadLevel Additive fails to create GameObjects for some scenes(which worked before)
-Happens on nearly any iOS device