Make AnimationNodeAnimation unique

Godot Version

v4.2.1.stable.mono.official [b09f793f5]


I have this function that changes the animation contained inside an AnimationNodeAnimation:

public void SetAnimation(string animName)
        AnimationNodeAnimation animNode = (AnimationNodeAnimation)User.c.animationStateMachine.GetNode("Ability");
        animNode.Animation = (User.animLibrary+"/"+animName);

The problem is that it seems to change it for every instance of the animationTree, rather than for just the one attached to the “User”. I already made the AnimationNodeAnimation Local to the scene, but I still have this issue.

You probably need to make any Resource in between until you reach the AnimationNodeAnimation Resource also local to the scene.

What do you mean by in between? I tried making the AnimationNodeTransitions, and the other AnimationNodeAnimations in the animationtree local, but it doesn’t seem to fix the issue.

Every Resource from the AnimationTree.tree_root until you reach the AnimationNodeAnimation you want to change.

Thank you, this seems to have fixed my issue