I want to add an animation curve from script that controls an AnimatorController parameter
AnimationClip clip = new AnimationClip();
clip.name = name;
AnimationCurve curve = AnimationCurve.Linear(0.0F, 99999.0F, 1.0F, 99999.0F);
clip.SetCurve(“”, typeof(float), “MotionSpeed”, curve);
However, it fails on
clip.SetCurve(“”, typeof(float), “MotionSpeed”, curve);
“Can’t assign curve because the type does not inherit from Object.
UnityEngine.AnimationClip:SetCurve(String, Type, String, AnimationCurve)”