Is there a way to check what level the player is currently playing?
Something like,
if (current level == Level 1) {
NextLevel = Level 2;
}
if (GUI.Button (Rect (30, 50, 30, 14),"Next Level")) {
Application.LoadLevel(NextLevel);
}
Is there a way to check what level the player is currently playing?
Something like,
if (current level == Level 1) {
NextLevel = Level 2;
}
if (GUI.Button (Rect (30, 50, 30, 14),"Next Level")) {
Application.LoadLevel(NextLevel);
}
You can use Application.loadedLevel to get the index of the last loaded level, or Application.loadedLevelName to get the name of the last loaded level.