Ok, so I'm working on a small project that has a main menu and 10 levels. From time to time I edit different levels, and want to try them out, however I get a NullPointerException
as my levels rely on certain variables from the main menu for the levels to work, which means I have to alter my levels, then load my main menu and play from there.
Is there something that can be done in the Unity Editor to default load a specific scene when you hit Play, and not the scene you're on?
I could obviously resolve this to something like
public bool goToMenu; //set this to true in my levels through inspector
Start()
{
if (goToMenu)
//then load main menu
}
but it would be really handy if there was a way to set the default level to load when hitting play mode. I've had a look in Preferences but couldn't find anything.
Thanks!