-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Closed
Labels
Description
Version
- Phaser Version: 3.70.0
- Operating system: Any
- Browser:
Description
When you create a container with GameObjectCreator, only one of the children is displayed. Creating with GameObjectFactory works fine.
Example Test Code
class TestScene extends Phaser.Scene {
create() {
// does not show all children
this.make.container({
x: 10, y: 50,
children: [
this.make.text({
text: "qwer",
x: 50,
}, false),
this.make.text({
text: "asdf",
x: 100,
}, false),
this.make.text({
text: "zxcv",
x: 150,
}, false),
]
}, true)
// this works fine
this.add.container(10, 100, [
this.make.text({
text: "qwer",
x: 50,
}, false),
this.make.text({
text: "asdf",
x: 100,
}, false),
this.make.text({
text: "zxcv",
x: 150,
}, false),
])
// this also works fine
const container = this.make.container({
x: 10, y: 150,
children: [],
}, false)
container.add(this.make.text({
text: "qewr",
x: 50,
}, false))
container.add(this.make.text({
text: "asdf",
x: 100,
}, false))
container.add(this.make.text({
text: "zxcv",
x: 150,
}, false))
this.add.existing(container)
}
}
new Phaser.Game({
type: Phaser.AUTO,
width: 320,
height: 240,
scene: new TestScene(),
})