I am using
SceneManager.LoadScene(SceneManager.GetActiveScene().name);
to reload my current scene in unity , but when i run the game ,in hierarchy lots of scene are appearing. Also if i do some editing, i can not save the scene any more. unity is giving and error "Overwriting the same path as another open scene is not allowed". I am new to game development. I would appreciate any help.
void OnCollisionEnter2D(Collision2D coll) { if (coll.gameObject.tag == "Enemy") { makeDead (); } }
\$\endgroup\$makeDead
hasSceneManager.LoadScene(SceneManager.GetActiveScene().name);
\$\endgroup\$