Loading Scenes
A start to every game.
Working on the main menu. To do so I created a new scene.
Then we have to add it to the build settings.
Then we have to go to this scene and populate it with the main menu.
Those shown in red bracket is what was added. Next we move into a script called MainMenu after attaching it to the Canvas.
Here we import reference to the SceneManager and create a method called LoadGame(). We set it to public so we can have our button reference it and we call on the scene manager to load the scene at index of 1. This would be the main game scene we added to the build settings above.
For this we take our button, add the game object with the script into the OnClick method and then search for our LoadGame() method in the MainMenu script.
Now at game play, this button will load the game scene and we are good to go. You can see in the script I also created an input called start which maps to the Xbox one controllers start button. For windows anyway. I read that its a different index on some other platforms like android.