restart scene and scripts 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);