If start game --> load last level where you have played on it

Hello. I have a big question. I am making a 3D Racing game using the unity3d engine. The game works link this: You start at level 1 with one car. You have 2 Minutes to drive around the race track. If you made it you reach level2 and unlock a new car. But there is a problem. Your mother calls you to go eating and you close the game. After eating you come back and open the game and you want to play your level 2…

HOW CAN I MAKE IT THAT WHEN YOU CLOSE THE GAME IN LEVEL 2 AND OPEN IT AGAIN THAT YOU MUST NOT BEGIN AGAIN AT LEVEL1 ??? How can I load/save the lastest level you have reached??? Some scripts will be helpful:=)

You can use PlayerPrefs. Whenever you reach a new level, use the Set() method to update the last level reached, in a similar way:

//Here, you are in the function that updates the last level reached
//...
level_index++;  //Because you've reached the next level
PlayerPrefs.SetInt("Last_Level", level_index);

And, at the beginning of the game, use Get() method to load last level reached:

//...
level_index = PlayerPrefs.GetInt("Last_Level");
Application.LoadLevel(level_index);

If things aren’t clear yet, you can check for another example in this thread of the Forum (check bigkahuna’s answer):

http://forum.unity3d.com/threads/42398-Example-of-using-Player-Prefs-to-save-and-get-a-variable.

At last, pay attention to handle the special case regarding the last track of the game (you cannot make level_index++, in that case).

I have problem. When I start game on Android my first scene with play button do not work.

same here what to do