protected virtual void OnDisable() { CameraHandler.RemoveMapRotationListener(OnMapRotationChanged); DestroyAttachedEffects(); if (null != m_playableDirector) { TimelineContextUtility.ClearFightContext(m_playableDirector); m_playableDirector.Stop(); m_playableDirector.set_playableAsset(null); } if (m_animationCallback != null) { m_animationCallback.Release(); m_animationCallback = null; } ReleaseAnimator(); AnimatedCharacterData animatedCharacterData = GetAnimatedCharacterData(); if (null != animatedCharacterData) { animatedCharacterData.UnloadTimelineResources(); ClearAnimatedCharacterData(); AssetManager.UnloadAssetBundle(AssetBundlesUtility.GetAnimatedCharacterDataBundle(m_animatedCharacterDataBundleCategory)); m_animatedCharacterDataBundleCategory = BundleCategory.None; } if (m_activeCharacterDataBundleCategory != 0) { AssetManager.UnloadAssetBundle(AssetBundlesUtility.GetAnimatedCharacterDataBundle(m_activeCharacterDataBundleCategory)); m_activeCharacterDataBundleCategory = BundleCategory.None; } }
protected unsafe virtual void OnDestroy() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown CameraHandler.RemoveMapRotationListener(OnMapRotationChanged); if (null != m_animator2D) { m_animator2D.remove_AnimationLooped(new AnimationLoopedEventHandler((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/)); m_animator2D.remove_Initialised(new Animator2DInitialisedEventHandler((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/)); } if (m_animationCallback != null) { m_animationCallback.Release(); m_animationCallback = null; } Clear(); UnloadTimelines(); m_loaded = false; }