- Home /
Searching for solution to AsyncOperation crashing Unity on stop playmode in Editor
I have an important question. Is there a way to allow AsyncOperation activation scenes to be finished just before stopping playmode in Editor?
I ask that in a sense that i have allowSceneActivation = false on these scenes that wait to be activated and each time somebody stops playmode then Unity crashes as scene is loading though it is not yet allowed to load. Interestingly if you change anything in whatever script running in the scene, AsyncOperation will finish and new scene will load itself ignoring allowSceneActivation.
I tried to use Application.CancelQuit and finish AsyncOperations and load empty scene to quit but that does not work in Editor or somehow is ignored. I tried loading other Scene right before quitting (OnApplicationQuit) but no success. So do you have any other ideas how i should approach it?
Our idea is that we have player in the level and we load new one in the background to not interrupt the experience but it screws us when we want to just stop testing game in the Editor.
To clarify i fully understand that Unity will always crash when i stop playmode when scenes are in "is loading" state but that is what i try to prevent.
Your answer
Follow this Question
Related Questions
Why is unity crashing on "Play mode" 1 Answer
Why wont Unity open? 0 Answers
Cant quit Unity Editor 0 Answers
Unity internal error in Playtest mode. What is the cause and how do I prevent it?? 0 Answers
Unity Re-compiles on Play 1 Answer