Using Unity 2021.2.17f1, when loading the same scene that is open using SceneManager.LoadScene crashes editor. Is this expected behaviour? For now I am just adding a separate, almost empty scene to load then in that scene I scripted to load the scene I was just in back. Not sure why it works that way but the other way crashes!
It certainly shouldn’t.
What if you make a blank scene and just your “reload me again and again” script, just make Unity load the same scene again and again each frame?
That has always worked for me but I don’t have 2021.2.17 handy to see right now.
EDIT: I actually do this all the time in my SceneHelper: if you pass in null it will simply load the currently active scene. The code:
https://gist.github.com/kurtdekker/862da3bc22ee13aff61a7606ece6fdd3
I hope this will help others, I am using the fantastic Mediapipe plugin from Homuler here GitHub - homuler/MediaPipeUnityPlugin: Unity plugin to run MediaPipe, it has something called GLOG enabled by default which can be switched off, once we started our scene glog was on and it was causing an immediate crash bug on reload of most scenes but only intermittently.
Turning off GLOG on his plugin fixed it, not a Unity issue sorry!