Animation player

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

Hi,
animation player starts playing the animation if I open the scene A. But if I switch scene A to other scene and than go back to scene A animation player resets and starts playing again.

Animation player should pause if I open another scene and resume playing if I go back.

My code, but I don’t know what to do next.
$Animation_player.play(“Animation”)

Could you give me some advise? Thank you.

It’s probably because you are “destroying” Scene A, so it has no memory of where the animation was up to. You could try just hiding scene A and pause the animation.

SteveSmith | 2022-10-03 14:32

Maybe you can store the time or frame of that animation and send the information to the next scene, then when returning to that first scene send back the time or frame to play the animation from this point and not from zero. But I don’t know how to do that.

KozelMx | 2022-10-03 17:16