Sprite inside container doesn't play animations in phaser 3.53 and newer

The animation is inited in the scene like this:

let _frameObject = { prefix: "frame_", start: 0, end: 18, zeroPad: 2 };
this.anims.create({ key: "fish_1", frameRate: 24, repeat: -1, frames: this.anims.generateFrameNames("fish_1", _frameObject) });

This sprite doesn’t play animation:

let _test_1 = new Phaser.GameObjects.Sprite(this, 100, 300, "fish_1");
this.add.container(0, 0, _test_1);
_test_1.play("fish_1"); // or _test_1.anims.play("fish_1");

these two sprites do play the animation:

let _test_2 = new Phaser.GameObjects.Sprite(this, 250, 300, "fish_1");
this.add.existing(_test_2);
_test_2.play("fish_1"); //or _test_2.anims.play("fish_1"); 

let _test_3 = this.add.sprite(400, 300, "fish_1");
_test_3.play("fish_1"); //or _test_3.anims.play("fish_1");

So, sprite added to the scene plays the animation, sprite added to the container added to the scene doesn’t play animations.
All works when I change Phaser version to 3.52.0
Did something changed in the 3.53 version?

Thanks
Greg

Try

this.add.existing(_test_1);
this.add.container(0, 0, _test_1)

Believe that should work in Phaser v3.55.2.

Moreover, this should work for Containers in any Phaser version:

let _test_1 = this.add.sprite(100, 300, "fish_1");
this.add.container(0, 0, _test_1);
_test_1.play("fish_1"); 

I was also suprised when it didn’t work. It took me quite a lot of time to figure out that changing the version of Phaser make it working :confused: I need to create the Sprite first, and later add it to scene, not at the time of creation like in your example, so I wanted to avoid scene.add.sprite()

There’s always

let _test_1 = this.add.sprite(100, 300, "fish_1")
  .setActive(false)
  .setVisible(false);
// etc.

to solve this problem, add sprite to scene before adding to container

And animation will work!