How to quit application through script in Unity? -- Unity

 How to quit application through script in Unity? -- Unity


Stop running  game at runtime.
Debug.Break();

Close the Unity Application.
EditorApplication.Exit(0); 

Quit the deployed game/App.
Application.Quit(); 

source:

Comments

Popular posts from this blog

GameObject.SetActive() v.s. GameObject.active

output message to Unity Console - Debug.Log() v.s. Debug.LogWarning() v.s. Debug.LogError() v.s. print()