// Loading complete. public IEnumerator LoadingComplete() { Util.DebugPrint("All completed at", Profiling.Millis); AssetLoader.instance.PrintMem(); Singleton <LoadingManager> .instance.LoadingAnimationComponent.enabled = false; AssetLoader.instance.Dispose(); Fixes.instance?.Dispose(); CustomDeserializer.instance?.Dispose(); Profiling.Stop(); yield break; }
internal override void Dispose() { UIFontManager.callbackRequestCharacterInfo = (UIFontManager.CallbackRequestCharacterInfo)Delegate.Remove(UIFontManager.callbackRequestCharacterInfo, new UIFontManager.CallbackRequestCharacterInfo(instance.RequestCharacterInfo)); Font.textureRebuilt -= new Action <Font>(instance.FontTextureRebuilt); Revert(); base.Dispose(); if (imageMaterial != null) { UnityEngine.Object.Destroy(imageMaterial); } foreach (Text t in texts) { t.Dispose(); } if (textMaterial != null) { UnityEngine.Object.Destroy(textMaterial); } if (bgMesh != null) { UnityEngine.Object.Destroy(bgMesh); } if (bgMaterial != null) { UnityEngine.Object.Destroy(bgMaterial); } instance = null; imageMesh = null; imageMaterial = null; animationMesh = null; animationMaterial = null; barBGMaterial = null; barFGMaterial = null; textMaterial = null; bgMesh = null; bgMaterial = null; imageLoaded = animationLoaded = fontLoaded = bgLoaded = false; AssetLoader.instance?.Dispose(); Sharing.instance?.Dispose(); Profiling.Stop(); }