So before moving onto lesson 26 I tested out the game and noticed that upon ball falling to the lose collider in Level 1, the scene shifts to Level 2 instead of Game over. So I started investigating. The code on LoseCollider is:
private void OnTriggerEnter2D(Collider2D collision)
{
SceneManager.LoadScene("Game Over");
}
and Scenes are like this
and in Build Settings
So I decided to do some investigating and I’ve added a piece of code to SceneLoader script that lists available scenes in each scene
private void Start()
{
Debug.Log($"Available scenes in: {SceneManager.GetActiveScene().name}");
foreach(Scene scene in SceneManager.GetAllScenes())
{
Debug.Log($"Scene: {scene.name}, path: {scene.path}");
}
}
And that resulted in this really puzzling output:
Also, not sure if related but this has started showing up in my hierarchy yesterday
I usually see one ore more scenes where one is loading and others are loaded. I can remove the loaded scenes but the loading one isn’t going away nor is it getting loaded…
I am totally confused here, if anyone has any idea what I’ve messed up or what to try please help.