restart scene through code unity code example
Example: unity reset scene
//for unity c#
using UnityEngine.SceneManagement;
...
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
//for unity c#
using UnityEngine.SceneManagement;
...
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);