godot icon indicating copy to clipboard operation
godot copied to clipboard

Animation Player won't auto play

Open carlinitos opened this issue 12 years ago • 10 comments

Hi!.

Create root Node2D, add a sprite. Add an AnimationPlayer as a child of it, or next to it as a child of Node2D. Create a new animation. Edit the animation so it changes the sprites position over time. Edit the animation resource so that it loops. Now select the AnimationPlayer and change the play property to the animation you just created it plays automatically in the editor... so far so good, pretty nice work flow.

BUT when you hit: test scene, the animation won't auto play. You can add a piece of code that tells the AnimPlayer to play in _ready but you shouldn't have to, i believe

carlinitos avatar Dec 03 '14 01:12 carlinitos

possibly related to #876

adolson avatar Dec 03 '14 06:12 adolson

I can't reproduce this, the autoplay button is the one that looks like this [A> can you make a little scene for me to test?

reduz avatar Dec 05 '14 02:12 reduz

oh my god, i feel so stupid, i'm closing this, sorry

carlinitos avatar Dec 05 '14 04:12 carlinitos

I had the same stupid problem and found this issue. Now I can get rid of a couple of scripts :p Could there be a better way to show this on the GUI? I expected it to be in the inspector tbh (isn't the active boolean enough when set to true?)

Zylann avatar Nov 03 '16 22:11 Zylann

I think it needs a more obvious icon or a property in the inspector. I have been looking for a better icon but I couldn't find a good one. Maybe it should show as an icon+label in the animation editor. Before opening this post, I spent 20 minutes looking for the button, an I was about to write code to auto-start the animation, and I think many new Godot user will face that issue too.

jahd2602 avatar Mar 21 '18 18:03 jahd2602

I got burned by this, too. I was completely mystified when nothing happened in Play Scene. Google brought me here.

amonroejj avatar Sep 29 '19 17:09 amonroejj

This was very hard for to me find as well, not very intuitive. I expected to find an option for this in the inspector. Perhaps this should be considered a UX issue?

nsrosenqvist avatar Feb 02 '22 20:02 nsrosenqvist

@nsrosenqvist Please open a proposal on the Godot proposals repository about this.

The Autoplay property is stored in the AnimationPlayer node, but it stores a string property that can only match one animation at a given time. This is why it's currently hidden in the inspector.

Exposing it will require adding a dynamic property hint generator that returns a list of animations associated to the AnimationPlayer, as it shouldn't be possible to enter invalid animation names. I believe there are other nodes where this is already done, but I can't remember any examples right now.

Once this is done, the Autoplay button can be removed in the animation editor as it'll be superseded by the Autoplay property in the inspector.

Calinou avatar Feb 02 '22 21:02 Calinou

Oh man got hung up on this too! Was about to start scripting it. Please just replace that terrible icon with "Autoplay" already.

Unnecessary sharp edge since 2014...

gnat avatar Mar 22 '25 01:03 gnat

Oh man got hung up on this too! Was about to start scripting it. Please just replace that terrible icon with "Autoplay" already.

Unnecessary sharp edge since 2014...

Being very direct to the point, this is a design flaw It's not intuitive and I'm glad I found this thread because I see I'm not the only one

PROBLEM Image

-> This is a Button and it has an ON/OFF behavior

EASY SOLUTION

It could be either a

  • Switch
  • Checkbox
Image

FelipeEmos avatar Nov 01 '25 22:11 FelipeEmos