Always avoided it for exactly these kind of issues with MRTK.
I would rather suggest:
Have one MRTK and landing scene at build index 0
. This one you never un- or reload. Here you also place your manager script responsible for (re)loading the content.
And load everything else via additive scene loading and then later unload and reload only these additional scenes.
This leaves the MRTK intact and you can still load, unload and reload your app content.
The mentioned manager class might look somewhat like
// Put this into the MRTK scene
public class SceneLoader : MonoBehaviour
{
private void Awake ()
{
// Register callback for everytime a new scene is loaded
SceneManager.sceneLoaded += OnSceneLoaded;
// Initially load the second scene additive
SceneManager.LoadScene(1, LoadSceneMode.Additive);
}
// Called when a new scene was loaded
private void OnSceneLoaded(Scene scene, LoadSceneMode loadMode)
{
if(loadMode == LoadSceneMode.Additive)
{
// Set the additive loaded scene as active
// So new instantiated stuff goes here
// And so we know which scene to unload later
SceneManager.SetActiveScene(scene);
}
}
public static void ReloadScene()
{
var currentScene = SceneManager.GetActiveScene();
var index = currentScene.buildIndex;
SceneManager.UnloadScene(currentScene);
SceneManager.LoadScene(index, LoadSceneMode.Additive);
}
public static void LoadScene(string name)
{
var currentScene = SceneManager.GetActiveScene();
SceneManager.UnloadScene(currentScene);
SceneManager.LoadScene(name, LoadSceneMode.Additive);
}
public static void LoadScene(int index)
{
var currentScene = SceneManager.GetActiveScene();
SceneManager.UnloadScene(currentScene);
SceneManager.LoadScene(index, LoadSceneMode.Additive);
}
}
And then for reloading your current scene do
SceneLoader.ReloadScene();
or as usual load a different scene via
SceneLoader.LoadScene("SceneName");
or
SceneLoader.LoadScene(buildIndex);
Of course you could also implement the async versions following the API examples.