Add goup in container


#1

It’s possible to add a group inside container ?
I tried this :
This.holder = this.scene.add.container(0,0)
grp = this.scene.add.group()
This.holder.add(grp)

But I have this error :
gameObject.once is not a function
child.willRender is not a function


#2

It look like you can only add a GameObject or a GameObject Array to the container.

https://photonstorm.github.io/phaser3-docs/Phaser.GameObjects.Container.html#addAt__anchor

Maybe you can try to add all the children of the group to the container. But I have no idea how well this would work.

this.holder.add(grp.children.getArray())

#3

No, you can not. Groups in Phaser 3 are simply a collection. The objects belonging to a group are always child objects of the scene.
What are you trying to do?