Hey folks, I’m an animator and have been building a tool to automate some of the more mundane tasks I have to do in my everyday work.
I’ve made a custom Editor window with a bunch of different options. I’ve gotten almost everything working like it should, with the exception of setting curves for material properties. (_Color, MainTex.offset.x, etc)
I run a function that creates and applies an animator, creates a clip, and then loops through all children and adds curves for position, rotation and scale, if desired. I’m also wanting to add curves for material properties, but I’m failing. ![]()
When I reference the documentation for setting a material curve -
clip.SetCurve (“”, typeof(Material), “_Color.r”, curve);
I get yellow keys with (missing!).
When I manually record a change, I see the path is different. (see attached photo)
I’m using AnimationUtility.CalculateTransformPath to get the path, and it’s working when I set keys for transforms just fine.
I’ve been googling a crap ton, but as of now, haven’t been able to figure out just exactly what I’m doing wrong. Any help would be hugely appreciated. Thanks!

