Load scenes

hi, i’m working on the menu to have access to different services on my game, i’m working on a 2D game and i have different “pages” with different functions (Options, levels to load…), so my question is, should i make all these “pages” on the same scene or should i load every scene “page” apart ?


This is purely a matter of personal preference. You can use a difference scene for every screen that you have, that is:

Scene 1 = Main Menu

Scene 2 = Instructions

Scene 3 = Control Keys


However, the above would have a lot of duplication and would not make the project very neat in my opinion.

What I would do is to make everything on ONE scene. And put the screens (or “pages”) at different locations in 3D space. For example:

Position 0, 0, 0 = Main Menu stuff

Position 0, -50, 0 = Instructions

Position 0, -100, 0 = Control Keys

Then, you simple move the camera to that position depending on what you want to see. For example, if your camera is at the Main Menu and you click on “Instructions”, the camera would move to position 0, -50, 0 to go to the instructions screen.

i think is beter make the scene apart, and you can use:


to load the new scene and use global variables to share information betwen them or with playerprefs, ex:

var stringVariable : String;
var IntVariable : int;

PlayerPrefs.SetString("SavedString", stringVariable); //save a string
PlayerPrefs.SetInt("savedInt", IntVariable);//save a int

//other scene

var stg = PlayerPrefs.GetString("SavedString");//get the saved string
var i = PlayerPrefs.GetInt("savedInt"); //get the saved int