Hi,
I am making a project where i need an option for the user to reset the whole game using a button.
This depends a bit on what needs to be reset. On button press:
- (Optionally) Delete all saved data
- (Optionally) Wipe PlayerPrefs
- Load the current / main scene (to reset it)
Ummm I don’t have any saved data I just want the scene to be started again.
Just reload the current scene then:
SceneManager.LoadScene(SceneManager.GetActiveScene().name);
You need to add ‘using UnityEngine.SceneManagement;’ if you did not already.
3 Likes
Thanks for the help!