AnimationUtility.SetObjectReferenceCurve

切换到手册
public static void SetObjectReferenceCurve (AnimationClip clip, EditorCurveBinding binding, ObjectReferenceKeyframe[] keyframes);

参数

keyframes将此值设置为 null 将会删除曲线。

描述

添加、修改或删除给定剪辑中的对象引用曲线。

Unity 具有两种类型的动画:浮点和对象引用。浮点曲线是一种随着时间的推移对浮点属性进行动画化的经典曲线。对象引用“曲线”是一种随着时间的推移对对象引用属性进行动画化的构造。

此方法用于浮点曲线。有关对象引用曲线,请参阅:AnimationUtility.SetObjectReferenceCurve