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