#if UNITY_EDITOR
UnityEditor.EditorApplication.isPlaying = false;
Debug.Log("编辑状态游戏退出");
#else
Application.Quit();
Debug.Log ("游戏退出"):
#endif
转载于:https://www.jianshu.com/p/8ac39cb7d4fe
#if UNITY_EDITOR
UnityEditor.EditorApplication.isPlaying = false;
Debug.Log("编辑状态游戏退出");
#else
Application.Quit();
Debug.Log ("游戏退出"):
#endif
转载于:https://www.jianshu.com/p/8ac39cb7d4fe