The game freezes when I try to load the next scene but when I load it with “Additive” mode it’s loaded fine (using SceneManager.LoadScene(“NextScene”, LoadSceneMode.Additive)).
In editor everything works even with mode “Single”, the problem only appear with Android.
I don’t want use “Additive” mode because it loads the content of the new scene above the old one.
- using “adb logcat” to see if any exception occur but there are no exceptions.
- load an empty scene as a new scene but the problem still appear.
- load with “Additive” mode and after the next scene is loaded I try to Unload the old scene using SceneManager.UnloadScene(“OldScene”) but it freezes again.
So the problem is appear when Unity try to unload the old scene.
(I use Unity 2018.4.10f1 LTS).
Thanks in advance for any help.
Why don’t you try
LoadScene will freeze your game and not let anything load unless you call it async, which is what the above function does. Perhaps you don’t notice it on your computer because things load too fast? Or are you saying the entire game freezes after it loads and not just temporarily? Are building to android app bundle?
I try to build the game with PC and I face the same problem.
I see what in the output_log.txt file in “C:/Users/…/AppData/Local/Temp/…/My game name/Crashes” and the first readable messages after the crash are like this:
“ERROR: SymGetSymFromAddr64, GetLastError: ‘Attempt to access invalid address.’ (Address: 00007FFEF20E5212)”
without any other errors or exceptions by my game,
so I try to test the game with an updated version of Unity (2018.4.10f1 → 2018.4.20f1),
Abracadabra everything works fine with the new version!!
and the problem doesn’t appear anymore!!
I think it was a memory management problem in Unity 2018.4.10f1 but I don’t know why.