Application.Quit Unity Editor Code Example


Example 1: application.stop unity

using UnityEngine; using System.Collections;// Quits the player when the user hits escapepublic class ExampleClass : MonoBehaviour {     void Update()     {         if (Input.GetKey("escape"))         {             Application.Quit();         }     } }

Example 2: unity application quit

Application.Quit();

Example 3: unity exit script

//C#  public static class AppHelper  {      #if UNITY_WEBPLAYER      public static string webplayerQuitURL = "http://google.com";      #endif      public static void Quit()      {          #if UNITY_EDITOR          UnityEditor.EditorApplication.isPlaying = false;          #elif UNITY_WEBPLAYER          Application.OpenURL(webplayerQuitURL);          #else          Application.Quit();          #endif      }  }

Comments

Popular posts from this blog

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Can Feynman Diagrams Be Used To Represent Any Perturbation Theory?