Replace AnimationUtility.SetEditorCurve with AnimationClip.SetCurve

This commit is contained in:
Haï~
2023-10-02 04:53:27 +02:00
parent 48b71e063a
commit c556a9b96a
2 changed files with 27 additions and 21 deletions
+6
View File
@@ -61,6 +61,12 @@ namespace AnimatorAsCode.V1
};
}
internal static void SetCurve(AnimationClip clip, EditorCurveBinding binding, AnimationCurve curve)
{
// https://forum.unity.com/threads/new-animationclip-property-names.367288/#post-2384172
clip.SetCurve(binding.path, binding.type, binding.propertyName, curve);
}
internal static AnimationCurve OneFrame(float desiredValue)
{
return AnimationCurve.Constant(0f, 1 / 60f, desiredValue);