when generally, we click on a node in a statemachine :
can someone change this ?
animation clips at runtime ?
by script of course ? (assigning the new animation to the node)
since I have a little bit complicated architecture; I didn't want to duplicated over and over, but just reassign animations, like it is widely used in Unity.
Maybe by getting the tree_root (doc), navigating to the node using get_child_by_name (doc), and then modifying the animation using set_parameter (doc)?
Just looking through the API though, it looks like it's fairly complicated to modify, which is a bit surprising. Using tree_root and navigating to the node that way seems to be the only way to get the AnimationNode though.
AnimationNodeStateMachinePlayback ansmp= at2.Get("parameters/playback")as AnimationNodeStateMachinePlayback;
AnimationNodeStateMachine ansm= at2.TreeRoot as AnimationNodeStateMachine;
AnimationNodeAnimation anim_node = new AnimationNodeAnimation();
anim_node2.Animation = "UnUseItem";
it works thanks me