0
Unity Reset
Which code can help to reset simple card game? Public void Reset() { SceneManager.LoadScene(SceneManaget.GetActiveScene().SimpleScene); } Not working
2 Antworten
+ 1
If you want to reload the scene
Do not forget to implement "using UnityEngine.SceneManagement;"
And write this : SceneManager.LoadScene(SceneManager.GetActiveScene().BuildIndex);
+ 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