How can we add a callback function to an instanced AnimationPlayer?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By blurrred

When I try adding a callback function to an instanced scene with an AnimationPlayer and editable children, the function fails to execute when the keyframe occurs.

This problem is fixed if I change the scene with the AnimationPlayer to local, but I would prefer to avoid doing that because it’s an imported model with animations from Blender. If I make changes and re-import, then I’d have to re-instance the scene and re-add the callback functions.

It’s just a hassle that I shouldn’t have to go through and I think there must be a better way.

Is there?

When I try adding a callback function to an instanced scene with an AnimationPlayer and editable children, the function fails to execute when the keyframe occurs.

Unsure why this would fail but an alternative, assuming you’re just wanting timings, is to have another AnimationPlayer with call tracks only.

spaceyjase | 2023-02-21 11:16