public static void Init() { #if UNITY_ANDROID && !UNITY_EDITOR GameObject go = new GameObject("HideAndroidButtons"); HideAndroidButtons hab = go.GetComponent <HideAndroidButtons>(); if (hab == null) { hab = go.AddComponent <HideAndroidButtons>(); } DontDestroyOnLoad(go); #endif }
private System.Collections.IEnumerator Init() { yield return(null); if (Screen.height > 720) { #if !UNITY_EDITOR && !UNITY_STANDALONE UnGfx.SetResolution(720, true); #else UnGfx.SetResolution(720, false); #endif } m_bInitialized = true; /*Logger logger = new Logger(); * logger.Start(); * CVarTable.Start(); * ConsoleMgr cmd = new ConsoleMgr(); * logger.cmd = cmd; */ #if UNITY_ANDROID || UNITY_IPHONE || UNITY_IOS channel = "xyhy"; //version = VersionInfoData.CurrentVersionInfo.VersionNum; user = SystemInfo.deviceUniqueIdentifier; #endif #if UNITY_ANDROID && !UNITY_EDITOR //if(!VersionInfoData.CurrentVersionInfo.IsReleaseVer) //{ // LuaInterface.Debugger.Log("Init U3DAutomationBehaviour"); // gameObject.AddComponent<WeTest.U3DAutomation.U3DAutomationBehaviour>(); //} #endif //设定语言 Localization.language = "Chinese"; GameSetting gameSetting = new GameSetting(); gameSetting.InitSetting(); gameSetting = null; /*for (int i = 0; i < 3; i++) * { * yield return new WaitForEndOfFrame(); * }*/ //隐藏Android虚拟按钮 HideAndroidButtons.Init(); //为版本更新创建游戏内核 //GameKernel.CreateForVisionUpdate(); //CreateUIRoot(); //需不需播放CG 需要的话得先播放CG之后,再显示更新游戏(待处理) //UpdateSys.Instance.StartGame(); //IpAddress.Init(); /*LuaInterface.Debugger.useLog = ProjectConfigUtility * .GetProjectConfig() * .HasDebugLogOutput;*/ Destroy(gameObject); InitGameStaticClass(); }