So I am working on a project for class, but my main problem I am having is loading a new level, along with making a menu at the end to restart my game. I am basically brand new to scripting. I have tried looking up tutorials, but I can’t find one that actually works. Its a 2 level with rolling a ball across the level around obstacles and picking up coins. I was able to find tutorials on scripting for score, a win text, picking up coins and moving the player. If anyone can point me in the right direction for a good tutorial or to help break it down for me would be greatly appreciated. Scripting feels like rocket science to me since this is my first project that I am actually working with scripts.
Are you looking for a tutorial or a way to load levels?
Roll a ball tutorial
UI Tutorials
Change Scene
//Load a Scene
SceneManager.LoadScene("SceneToChangeTo");
Where the “SceneToChangeTo” is the scene you want to load. This code should be inserted somewhere that will ‘trigger’ it. Such as if the player presses space bar change scene, or player dies change scene, or user clicks button, and etc. Moreover, your scene will need to be added to the manager.
File > Build Settings
Then drag your scene(s) into the ‘Scenes in build.’
Sgm3 thank you so much! That will definitely help with this project.