There’s a public, undocumented method named “SetAnimatedProperties” in AnimationPlayableExtensions. What does it do? It takes a playable and an animationclip, and returns nothing.
I had hoped it would allow me to swap the AnimationClip on an AnimationClipPlayable, but no such luck.
I wanted it for the same thing when making Animancer and couldn’t figure out what it does either. Destroying and recreating the playable isn’t too bad for performance though (or better yet just keep the old one disconnected from the mixer if you might need it again).
On a related note, what is the normalizeWeights parameter of AnimationMixerPlayable.Create actually supposed to do? My first guess was that it would make all the connected inputs add up to 1 weight (which would be nice), or it could clamp each input between 0 and 1 weight … but no, it doesn’t seem to do anything at all. I tested two copies of a model with various combinations of weights and they were both identical in all cases.
@Kybernetik I experienced the same thing with AnimationMixerPlayable.Create as well – normalizeWeights didn’t do anything for me either, which was unfortunate. I thought maybe I was doing something silly haha.
normalizeWeights is either broken or it does something completely unrelated to what we’d expect. Would be nice if it did work as it would save a bunch of time doing it manually.
Wow, and written by the guy responsible for at least a lot of the theory behind the Mecanim animation system (stuff like Blend Trees). So that means it’s possibly his fault that the Playables API documentation is so bad.
I don’t think Rune has worked on animation for years and years. He has been very visibly a part of the team working on the nested prefabs, and he’s made his own VR game as a side hustle. The stuff you’re talking about is from his master thesis from 2008, mecanim showed up quite a lot later than that.
That’s from three minutes on google, so you know, don’t go throwing shade in his direction for this stuff.
Hello! I know this is an old thread, but I found something interesting and I want to share it here.
Looks like SetAnimatedProperties could let you animate the PlayableBehaviour’s property in the playable.
I found it from a feature that, timeline allows me to directly animate a timeline clip, without any animator or animations.
As an example, the below clip is the ScreenFadeClip/Track from example of timeline, and I can animate the timeline clip without adding any animation(legacy)/animator.
I was interested in the mechanism of this feature, and found out that it internally creates an animation clip and uses SetAnimatedProperties to put the properties inside the playable when start playing, so the PlayableBehaviour’s properties could be animated.
This is the first feature that allows people to animate things other than GameObjects or Components (I suppose), and I’m thinking how to utilize this feature to make fun things.