- Home /
LoadLevel easy i know, but not working.
Hi all,
i have a stupid problem with loadlevel. In my scene "1" i have my script "Core" with this functions
public void nextLevel()
{
Application.LoadLevel(CurrentLevelID + 1);
}
public void restartLevel()
{
Application.LoadLevel(CurrentLevelID);
}
public void goToMenu()
{
Application.LoadLevel(0);
}
this is my new gui button:
And this is my build settings
Nothing goToMenu not work. when i click this button restart every time scene 1 and not load scene 0 "Menu", i try to replace
Application.LoadLevel(0);
with:
Application.LoadLevel("Menu");
But nothing. Help me please.
cattura-button.jpg
(22.6 kB)
cattura-build.jpg
(16.2 kB)
Comment
Answer by screenname_taken · Mar 10, 2015 at 07:16 PM
You should indeed use "Menu" with the command. Check your Raycaster on your canvas that the "Ignore Reversed Graphics" is not checked. If it is, and your buttons are flipped, it will ignore them.
ok i replace with:
Application.LoadLevel("$$anonymous$$enu");
and now "Ignore Reversed Graphics" is not cheked, in both scenes.
But not working :(
cattura-3.jpg
(38.1 kB)