I make menü with 15 level button
in first level I have 3 Cube
if I click third boolean will = true
if boolean = true game take me to menü screen
when I click second level button
Code must be invastigate (below)
second level button code is if level1 Cube 3 ==true he can access the level2
problem is if I write second level code to 2.level button it start search in menü screen (cube3) and give error because this gameobject(cube3) in level1 but it searching menü
I must save game
when he quit the game if he want access again level 2 must open
level2 code
if (GameObject.Find (“CUBE3”).GetComponent ().boolean == true) {
Application.LoadLevel(“level2”);
You can use Application.LoadLevelAdditive to load levels ‘on top’ of other levels, 'LoadLevel" deletes the old data
What you could do is create a ‘main’ level, that contains nothing but the Player and camera, this way the player is not ever accidentally deleted unless you use the old ‘LoadLevel’, then on each level create an empty gameobject ‘World’, and everything in the level is a child of World, and when you want to load a new level, do and if you want, destroy ‘World’ gameobject to destroy the old level and LoadLevelAdditive(“levelname”), to load the next level.
If you want to save Player information to a file, you’ll need to research C# file operations (or UnityScript/Boo)
Hope i helped some