Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

How to quit unity app

#if UNITY_EDITOR
	UnityEditor.EditorApplication.isPlaying = false;
#else
	Application.Quit();
#endif
Comment

unity Exit application

     public void QuitGame()
     {
         // save any game data here
         #if UNITY_EDITOR
             // Application.Quit() does not work in the editor so
             // UnityEditor.EditorApplication.isPlaying need to be set to false to end the game
             UnityEditor.EditorApplication.isPlaying = false;
         #else
             Application.Quit();
         #endif
     }
Comment

PREVIOUS NEXT
Code Example
Csharp :: asp.net data annotations Datetime 
Csharp :: c# get full URL of page 
Csharp :: how to disable a gameObject unity c# 
Csharp :: Animator.GotoState: State could not be found 
Csharp :: wann war der dritte weltkrieg 
Csharp :: camera follow player unity smooth 
Csharp :: unity check if key pressed 
Csharp :: detecting a right click unity 
Csharp :: how to flip character in unity 2d 
Csharp :: c# create new thread 
Csharp :: c# int to bool 
Csharp :: c# messagebox 
Csharp :: c# remove all null from list 
Csharp :: random from list c# 
Csharp :: set text in center wpf 
Csharp :: c# print all property values of object 
Csharp :: c# prime factorization 
Csharp :: mouselook script unity 
Csharp :: how to split and get last index values in c# 
Csharp :: c# create array of number from number 
Csharp :: how to chnage the Scale propery of rect tranform unity 
Csharp :: Unity Rotate around the real center 
Csharp :: ef core dbfirst 
Csharp :: close window from page xaml 
Csharp :: wpf load file content 
Csharp :: load prefab in script unity 
Csharp :: c# memorystream to byte array 
Csharp :: c# winforms textbox readonly 
Csharp :: c# checksum 
Csharp :: binding command to event wpf 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =