private static void SetValue(BezierAnimationCurve curve, int key, float value) { var keyframe = curve.GetKeyframeByKey(key); keyframe.value = value; curve.SetKeyframeByKey(key, keyframe); }
public int SetKeyframeByKey(int key, Vector3 localPosition, Quaternion locationRotation) { var curveType = x.GetKeyframeByKey(key).curveType; x.SetKeyframeByKey(key, localPosition.x, curveType); y.SetKeyframeByKey(key, localPosition.y, curveType); z.SetKeyframeByKey(key, localPosition.z, curveType); rotX.SetKeyframeByKey(key, locationRotation.x, curveType); rotY.SetKeyframeByKey(key, locationRotation.y, curveType); rotZ.SetKeyframeByKey(key, locationRotation.z, curveType); rotW.SetKeyframeByKey(key, locationRotation.w, curveType); dirty = true; return(key); }