private void OnDestroy() { if (!AnimationInstancingMgr.IsDestroy()) { AnimationInstancingMgr.Instance.RemoveInstance(this); } if (parentInstance != null) { parentInstance.Deattach(this); parentInstance = null; } }
public void clear() { if (!AnimationInstancingMgr.IsDestroy()) { AnimationInstancingMgr.Instance.RemoveInstance(this); AnimationInstancingMgr.Instance.RemoveMeshVertex(this, lodInfo); } if (parentInstance != null) { parentInstance.Deattach(this); parentInstance = null; } Stop(); // playSpeed = 1.0f; // lodFrequencyCount = 0; }