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

Debug.Log() v.s. print()

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

usage of Renderer.enabled