Unity3D 退出游戏应用的代码

public void ExitGame()//函数-用于退出游戏

    {
        //预处理
        Debug.Log("退出");
#if UNITY_EDITOR    //在编辑器模式下
        EditorApplication.isPlaying = false;
#else
        Application.Quit();
#endif
    }

猜你喜欢

转载自blog.csdn.net/leoysq/article/details/124773010