Problem with Changing Scenes?
Hi everyone,
I'm currently making a game in Unity for a project. However, I've run into an issue that I can't seem to find a good way around. I have 4 scenes in my project: "startup", "options", "level select" and "game". In "startup", I have a start menu screen the user will see when beginning the game. This involves the 'play' button, which when clicked, should transfer the user over to the "level select" scene. However, when I set this up in C# (this happens when referencing by both scene name and index), it insists on loading me into the "options" scene when click, though this clearly isn't what put into code (I use SceneManagement.LoadScene("level select") from the UnityEngine.SceneManagement class).
Any ideas why Unity insists on transferring me specifically to this one scene? The scene occurs 2nd ('1' by index) in the build management list, 'startup' occurs 1st. If it is seen why Unity does this, how could we work around it? I've tried incrementing scene index one-by-one in a for loop, and as I said I've attempted to reference both by name and index, but it isn't having it.
Thanks all.
P.S. I'm a relative noob, so if possible leave complexities out of any solutions. Thank you!
Are you sure you don't have any code in your level select
scene that redirects you to the options
scene? (take a look at your Awake
, OnEnable
, Start
, and even Update
methods.