0

Unity Reset

Which code can help to reset simple card game? Public void Reset() { SceneManager.LoadScene(SceneManaget.GetActiveScene().SimpleScene); } Not working

6th May 2020, 12:25 AM
Dianka Bod
Dianka Bod - avatar
2 Respostas
+ 1
If you want to reload the scene Do not forget to implement "using UnityEngine.SceneManagement;" And write this : SceneManager.LoadScene(SceneManager.GetActiveScene().BuildIndex);
13th May 2020, 8:49 PM
Yahya LAZREK
Yahya LAZREK - avatar
+ 1
I Think the error is the end part .SimpleScene Remove that part so they code your left with is Public void Reset() { SceneManager.LoadScene(SceneManager.GetActiveScene()); } (you also misspelld SceneManaget did you mean SceneManager there? i fixed it in the code above) Then you will reliad the scene you are coruntly on P.s. Ask the unity Answers for unity related questions
7th May 2020, 4:57 PM
The Axe Is Best
The Axe Is Best - avatar