UnityScripterAI
Discord ↗
Link Copied to Clipboard
×
"Restart button when the game is fail or completed"
public class RestartGame : MonoBehaviour { public void restartCurrentScene () { int scene = SceneManager.GetActiveScene().buildIndex; SceneManager.LoadScene(scene, LoadSceneMode.Single); } }