Changing a Blend Tree node's speed via editor script

Hi there, I’m currently working on an editor script to automate the building of some Animator stuff. I’ve been constructing blend trees using:

BlendTree.AddChild()

and then attempting to alter the speed of some of the children using:

BlendTree.children[3].timeScale = -1;

…unfotunately that does not work. I think it’s because the documentation mentions that BlendTree.Children returns a copy of the list of the BlendTree’s children (??) Any idea how I would actually do this?

Thanks in advance!

The usual pattern is:

var children = blendTree.children;
// modify children.
blendTree.children = children;

ah. that whole thing. of course!

Thanks very much :slight_smile: