I am using Unity 5.3 and can’t find any sample C# code for implementing scene manager using the build order as to the next scene to load. I am building a game for pre-literate children and want to load scenes in sequence but that sequence will change if certain conditions are met. I need the scene load to occur automatically rather than by button push because little kids will push buttons at random. For the specific situation where going to the next scene in the build order is not appropriate, I will specifically load the correct scene in an if/else statement. Help!
Don’t depend on the build order if your planning on being able to move through them in any order but straight through.
Try naming scenes very descriptive names like “MainMenu” and “OpeningScene” or “Level_0_1” or however it helps you remember. Then in code call the scene manager like this:
UnityEngine.SceneManagement.SceneManager.LoadScene("Level_0_1");
This way it won’t matter what order they are in the build menu, except ofcourse the first scene will load first…