Godot Version
4.3
Question
How can I get the name of the AnimationLibrary?
I can’t find a method or property that returns the name of the resource.
4.3
How can I get the name of the AnimationLibrary?
I can’t find a method or property that returns the name of the resource.
Is that the same as the .res file? If so just use the Resource property resource_path.
You can get the names of all the AnimationLibrary used in an AnimationPlayer or AnimationTree with AnimationMixer.get_animation_library_list()
I saw that option, but I would need to loop through the array, and I was expecting to load just one animation. I wanted to use the library itself to call the animation to play.
I find it strange that you cannot return the name of the AnimationLibrary from the AnimationLibrary itself. Ultimately, I believe I will simply need to AnimationMixer.add_animation_library() and assign it a name.
The AnimationLibrary doesn’t have a name, the AnimationMixer refers to it by what ever name it wants, and you can change each library’s name for each AnimationMixer; the libraries are stored in a Dictionary with String keys as assigned by the AnimationMixer. You will have to assign it a name via add_animation_library, just like one would assign a key with dictionaries.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.