예제 #1
0
 public void Apply()
 {
     if (tempCurve.length != 0)
     {
         curve.Replace(tempCurve);
     }
     tempCurve.Clear();
 }
예제 #2
0
 public void Apply()
 {
     if (tempCurve.length != 0)
     {
         curve.Replace(tempCurve);
         AnimationUtility.SetEditorCurve(animationClip, curveBinding, curve);
     }
     tempCurve.Clear();
 }
        /// <summary>
        ///     Sets all of the keys on the AnimationCurve to the given value.
        ///     If there are no keys, we add one.
        /// </summary>
        /// <param name="extends">Extends.</param>
        /// <param name="value">Value.</param>
        public static void SetValue(this AnimationCurve extends, float value)
        {
            extends.Clear();

            extends.AddKey(0.0f, value);
            extends.AddKey(1.0f, value);
        }