Best way to change back and forth between scenes?
So, I am working on a project and the entire time it has been basically in only one scene and that has worked fine. However, I am trying to add a tutorial like scene to introduce the user to the controls. Once they finish going through the tutorial they will go back to the start up. What I have come to notice that because the InputManager persists through scene changes you need the camera and cursor to do so as well otherwise it throws a bunch of different errors that are really hard to track down why they are happening. By making the camera and cursor DontDestroyOnLoad it has solved the issue of going to a different scene. However, whenever I go back to the first scene, Unity basically yells at me for having two cursors and cameras in the scene. What is a workaround for this? Am I going about doing this the right way? Is there a certain way that we should handle scene changes?
You can look at the way GalaxyExplorer handles this. Basically it has a scene called CoreSystems that is responsible for all of the MRTKish Singletons. Every other scene in the project has a script called ViewLoader that checks to see if CoreSystems is loaded. If it isn't that script loads CoreSystems before it proceeds.
This is referenced in #1823 with some possible fixes listed
Discussed in #1823 and I tried it in my personal project. Have a Master scene with common elements only, such as MixedRealityCamera, InputManager, DefaultCursor then, load the first scene and replace with other scenes. (SceneManager.UnloadScene/LoadScene)
Probably best to have a master scene, and additive load and unload as needed.
Closing issues older than 180 days. If this is still an issue, please reactivate with recent information.