/// <summary> /// 初始化 /// </summary> void Init() { InitGui(); DontDestroyOnLoad(gameObject); //防止销毁自己 Util.Add<PanelManager>(gameObject); Util.Add<MusicManager>(gameObject); Util.Add<TimerManager>(gameObject); Util.Add<SocketClient>(gameObject); Util.Add<NetworkManager>(gameObject); ResManager = Util.Add<ResourceManager>(gameObject); CheckExtractResource(); //释放资源 ZipConstants.DefaultCodePage = 65001; Screen.sleepTimeout = SleepTimeout.NeverSleep; Application.targetFrameRate = Const.GameFrameRate; }