UnityEditor.AnimationUtility.SetEditorCurve C# (CSharp) Метод

SetEditorCurve() публичный статический Метод

Adds, modifies or removes an editor float curve in a given clip.

public static SetEditorCurve ( AnimationClip clip, EditorCurveBinding binding, AnimationCurve curve ) : void
clip AnimationClip The animation clip to which the curve will be added.
binding EditorCurveBinding The bindings which defines the path and the property of the curve.
curve AnimationCurve The curve to add. Setting this to null will remove the curve.
Результат void
        public static void SetEditorCurve(AnimationClip clip, EditorCurveBinding binding, AnimationCurve curve)
        {
            Internal_SetEditorCurve(clip, binding, curve);
            if (onCurveWasModified != null)
            {
                onCurveWasModified(clip, binding, (curve == null) ? CurveModifiedType.CurveDeleted : CurveModifiedType.CurveModified);
            }
        }

Same methods

AnimationUtility::SetEditorCurve ( AnimationClip clip, string relativePath, Type type, string propertyName, AnimationCurve curve ) : void

Usage Example

Пример #1
0
 public static void SetEditorCurve(AnimationClip clip, string relativePath, Type type, string propertyName, AnimationCurve curve)
 {
     AnimationUtility.SetEditorCurve(clip, EditorCurveBinding.FloatCurve(relativePath, type, propertyName), curve);
 }
AnimationUtility