Reply To: Avoiding null reference exceptions when changing scenes

Slate Forums Support Avoiding null reference exceptions when changing scenes Reply To: Avoiding null reference exceptions when changing scenes

#1932
dgoyette
Participant

So far it seems that the following code, run just before I unload the scene, appears to do the trick:

foreach (var slateCutscene in FindObjectsOfType<Cutscene>())

{

if (slateCutscene.isActive)

{

slateCutscene.Stop();

}

}