0 votes


I export my animation list by typing the animation names in the export keyword, like this:

export( String, "move x", "move up", "slope" ) var animation_name = "move x"

func _ready():
    $AnimationPlayer.play( animation_name )

When I add animations, I have to edit the export in GDscript.

Can I get this list from the $AnimationPlayer, and tell it to the export keyword automatically?



Godot version 3.4.stable
in Engine by (132 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.