Cannot load a level

I am not sure which Forum to be in so I hope I am in the correct Forum since I am not sure of the cause of this incident.

I am having a problem loading a new level.
This used to work but suddenly stopped working. All other levels work.

I have a Start Level which is supposed to load a level called Level01 when I click the Start Button.

There is an OnClick event on the Start Button which looks correct.
It has the following information.

Runtime Only, LevelManager, Levelmanager.LoadLevel, Level-01 (Which is the level I am trying to load).

This is my LoadLevel code:

public void LoadLevel (string name) {
Debug.Log ("Level load requested for: " + name);
Application.LoadLevel(name);

The Debug.Log does not print anything and Level-01 does not execute.
It looks as though the LevelManager is not working for some reason.

I placed a Debug.Log statement into the LevelManager script within the Start event and it never fired.

All scenes are in my Build Settings.

I attached my Inspector settings

Thanks for any help given.

2150888–141978–Inspector.docx (130 KB)

I don’t see anything wrong with your code… I know it’s not the best answer, but you can also send in an int level ID to Application.LoadLevel(). The Level ID will show up in your build settings and each scene will get it’s own (in order that they were added to the build settings, starting with 0)

Gambit,

Thanks for your response.

I looked up LoadLevel and saw that you can use a string or an index.

The Build Settings, as you stated showed me the index values for each of my three scenes (0,1,2).
I changed my script and the OnClick event in the Inspector and it did not fix the issue.

Its strange because I can get to my third scene from my second scene and back to my first scene from the third scene but I cannot get to the second scene from the first scene.

Since the LevelManager script is the same for ALL scenes I have a feeling that my issue might be the entrance into my second screen Level-01.

Screen0: Start ID = 0
Screen1: Level-01 ID = 1
Screen2: Win ID = 2

Thanks again for helping,
Art Sterling magicscreen

Hi Gambit,

I just came across something that is probably the problem.

When I hover over the Start Button, it should turn Green and it doesn’t.

[Solved]
Hi Gambit, I resolved my issue.
I still don’t know what caused it but when I added a new text button to the canvas and it too did not work, I narrowed the issue down to something being wrong with the canvas.

I created a new canvas and moved the inner level objects to the new canvas and everything is noe working.

I only wish I could have found out what caused the issue in case it happens again.

It may be more difficult to solve the next time, if there is a next time.

Thans again for your help.

magicscreen