public void Release()
            {
#if UNITY_2018_3_OR_NEWER
#if VERYANIMATION_ANIMATIONRIGGING
                if (m_RigBuilder != null)
                {
                    m_RigBuilder.StopPreview();
                }
                if (m_VARigBuilder != null)
                {
                    m_VARigBuilder.StopPreview();
                }
#endif
                if (m_PlayableGraph.IsValid())
                {
                    m_PlayableGraph.Destroy();
                }
#else
                if (animator != null)
                {
                    animator.enabled = true;   //In order to avoid the mysterious behavior where an event is called from "UnityEditor.Handles: DrawCameraImpl", it is invalid except when updating
                }
#endif
                #region Save
                if (animator != null)
                {
                    animator.fireEvents = saveFireEvents;
                }
                #endregion

                animationClipValueSave.ResetValue();
                transformPoseSave.ResetOriginalTransform();
                blendShapeWeightSave.ResetOriginalWeight();
            }
Example #2
0
 public void Reset()
 {
     if (transformPoseSave != null)
     {
         transformPoseSave.ResetOriginalTransform();
     }
     if (blendShapeWeightSave != null)
     {
         blendShapeWeightSave.ResetOriginalWeight();
     }
 }
Example #3
0
        public void Reset()
        {
            {
                var time = uTimeControl.currentTime + (uTimeControl.GetDeltaTimeSet() ? uTimeControl.deltaTime : 0f);
                uTimeControl.currentTime     = 0f;
                uTimeControl.nextCurrentTime = time;
            }

            if (transformPoseSave != null)
            {
                transformPoseSave.ResetOriginalTransform();
            }
            if (blendShapeWeightSave != null)
            {
                blendShapeWeightSave.ResetOriginalWeight();
            }
        }
Example #4
0
        public void Reset()
        {
            {
                var time = uTimeControl.currentTime + (uTimeControl.GetDeltaTimeSet() ? uTimeControl.deltaTime : 0f);
                uTimeControl.currentTime     = 0f;
                uTimeControl.nextCurrentTime = time;
            }

            if (transformPoseSave != null)
            {
                transformPoseSave.ResetOriginalTransform();
            }
            if (blendShapeWeightSave != null)
            {
                blendShapeWeightSave.ResetOriginalWeight();
            }

#if UNITY_2019_1_OR_NEWER
            loopCount = 0;
#endif
        }