[MONO] Animation Looping issue

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

Hey everyone.
I’v found strange bahaviour of animation player.
My setup

I have following animation clip. Function Spam() just prints GD.Print output for debugging.

When i call my animation from code (once), it becomes looped.

_Animation.Play("FadeOut");

The only work around i’v found is to stop it from function that is triggered from animation itself with:
_Animation.Stop();

What am i doing wrong?

I tried to reproduce this but it worked fine for me.
Your screenshot shows the looping button unchecked (top right, below the pin), but is it still unchecked in your project?

Zylann | 2020-02-25 20:22

Iv’v uploaded a test project that reproduces my issue.

https://github.com/255h/Godot-LoopingIssue-Test/

And, yes i’v checked the looping option in my animation.

255h | 2020-02-26 07:52

:bust_in_silhouette: Reply From: Zylann

In the animation player editor, click on the Animation button, then choose Edit Transitions. You’ll see that your FadeOut animation has a transition leading to itself, causing it to loop. If you remove it, it should no longer loop (choose the empty item in the selection box).

Thank you!
That explains everything!

255h | 2020-02-27 07:03