public void Clear() { isBeCached = false; if (m_MainAnimator) { m_MainAnimator.runtimeAnimatorController = orginalAnimatorController; } m_nSkinID = -1; m_SkinObj = null; m_SkinObj_B = null; m_SkinObj_A = null; m_MainAnimator = null; m_AnimatorB = null; m_bipedIKAnimator = null; m_creatureProperty = null; m_ReferencedSkinCtrl = null; m_SkinnedMeshRenderList.Clear(); m_MeshRenderList.Clear(); m_AllRenders.Clear(); m_cameraProperty = null; m_characterController = null; m_entitySkinConfig = null; if (m_playEntityStaticEffect) { m_playEntityStaticEffect.Clear(); } if (m_switchEffectWithHeroDistance) { m_switchEffectWithHeroDistance.Clear(); } m_playEntityStaticEffect = null; m_switchEffectWithHeroDistance = null; m_sidekickEntity = null; m_SkinDataObj = null; foreach (RenderVisibleHelper vis in m_VisibleHelperList) { vis.hostSkin = null; var temp1 = vis; ResNode.DestroyRes(ref temp1); } ResNode.DestroyRes(ref m_bindEffect_A); ResNode.DestroyRes(ref m_bindEffect_B); ResNode.DestroyRes(ref m_bindSound); ResNode.DestroyRes(ref m_overrideController); m_VisibleHelperList.Clear(); ResNode.DestroyRes(ref m_characterShadow); ClearAlpha(); ClearBonesMap(); m_isLoadFinish = false; }
public void OnEnable() { pa = target as SwitchEffectWithHeroDistance; }