Can I stop the playing of animations in the editor without affecting the game?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By marc_r
:warning: Old Version Published before Godot 3 was released.

I know that I can keep a sprite from playing by deselecting the Playing property. This affects both the editor and the game, meaning the sprite won’t be shown playing in the editor nor in the game.

Is there an editor option that allows me to stop animations from playing in the editor, without affecting the game? I want to keep the animations playing in the game, but seeing them in the editor is driving me nuts.

Alternatively, can I toggle the Playing property of all sprites in my project with one click?

:bust_in_silhouette: Reply From: PMurrayDesign

I believe you can turn the animation off by setting its Play status to [stop] in the editor, then in the animation panel, choose your default/idle animation and click the little A inside a triangle to set it playing automatically when the scene loads. I know what you mean about them driving you nuts.

I just tried that, and it worked for AnimationPlayer. I was a bit imprecise in my question: I was thinking about animated sprites. Good to know though that you can stop AnimationPlayer in the editor without affecting the game. Actually, your post allowed me to switch on the AnimationPlayer animation in the editor, which I didn’t know one could do.

marc_r | 2017-06-19 13:03

Nice solution. I would like to stop AnimatedSprite nodes as well.

luislodosm | 2020-04-10 21:16

:bust_in_silhouette: Reply From: marc_r

And isn’t it funny that one thinks of a solution the minute after one has posted the question:

  1. Deselect the Playing property in the Editor

  2. Attach a script to the sprite root node and start the playing of the sprite animation in code once the sprite is ready.

Code:

func _ready():
	var sprite = get_node("AnimatedSprite") # or similar
	sprite.play()