- Home /
How to transition from Load to scene ?
I created a save and load system and the saved files are showing int he local folder I chose, the logs also shows that data is saving and loading properly but my issues is how to load back into playing, right now when I click on the Load button the data loads but I'm still on the menu scene and I want to be able to load back to the saved scene for example say I saved my progress on Level 2, I want to continue playing once I hit "Load" button instead of just staring at the menu.
Answer by MichaI · Sep 27, 2019 at 09:22 PM
You have to also save your scene or level (for example scene build Id). Than when loading your game firstly open the scene which id you've saved and than load rest of the data to your GameObjects.
To get current scene Id:
SceneManager.GetActiveScene().buildIndex;
To open scene by it's Id:
SceneManager.LoadScene(sceneIndex, LoadSceneMode.Single);
Thank you, this is exactly what I wanted to know, I'm new to all of this and that's why something just skip my $$anonymous$$d.
Your answer
Follow this Question
Related Questions
Best practices for increasing scene load times in 2d games 1 Answer
Android load/unload times 0 Answers
SceneManager.LoadSceneAsync freeze loading scene in editor. 0 Answers
How to make a loading screen? 2 Answers
Slow Android load times 0 Answers