void OnDestroy() { if (initHotFix != null) { initHotFix.Cleanup(); initHotFix = null; } }
async Task Start() { new LoggerLoader().Load(); CLog.Init(); CLog.Main.Info("CLog init."); DontDestroyOnLoad(GameObject.Find("Core")); initHotFix = new InitHotFix(); initHotFix.Init(); var uiLoader = new DefaultUILoader(); await uiLoader.Init(); UIContext.Instance.SetUILoader(uiLoader); SceneManager.LoadSceneAsync("UI"); GetComponent <Text>(); }