- Home /
Internal error when changing scene
Hi there
I am getting this error after changing scene, it's all that it logged out to the console.
ms_IDToPointer->find (obj->GetInstanceID ()) == ms_IDToPointer->end ()
I have a bootstrap scene that sets up a couple of things, like my game controller which is a singleton monobeahviour. When I load a level I check if this singleton exists and if not then I load the bootstrap scene, once the game controller has finished it's setup (in Start()) then I reload the original scene. I've not had any problem with this technique in the past. The issue seems to be when swapping back to the original scene. If i stop the loading of the bootstrap scene then the original scene loads fine. The same if i load into the bootstrap and then stop loading the original scene. And the same if i just load the bootstrap scene initially. The error only fires when swapping from the original scene to the bootstrap scene and then back again.
Level scene:
void Start()
{
if (GameController.Instance == null)
{
Debug.Log("No GameController: Boostrapping from BattleController");
Application.LoadLevel((int)SceneIds.Boostrap);
return;
}
}
And my bootstrap game controller:
void Start()
{
DontDestroyOnLoad(this);
// do some other stuff
Application.LoadLevel((int)SceneIds.GameBattle);
}
Any ideas what could be causing this?
It doesnt seem to be causing any issues, it's just worrying that it's showing up in the error log and that I might be doing something bad.
Thanks
Your answer
![](https://koobas.hobune.stream/wayback/20220613170343im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Unity script to open a new scene 3 Answers
Where is this (-1) coming from in my change level script? 1 Answer
Weird LoadLevel Error 1 Answer
On carachterspawn level load error? 0 Answers
Help please guys thank you so much! 1 Answer