Unity - Exit Game 4 October 2023·22 words Technical Note Unity Author icysamon I really love making things by hand and turning my ideas into reality. #if UNITY_EDITOR // Editor public void ExitGame() { UnityEditor.EditorApplication.isPlaying = false; } #else // Build public void ExitGame() { Application.Quit(); } #endif