Phaser API Documentation

remove(child, [destroyChild])


Removes the given Game Object, or array of Game Objects, from this Container.

The Game Objects must already be children of this Container.

You can also optionally call destroy on each Game Object that is removed from the Container.


name type arguments Default description
child Phaser.GameObjects.GameObject | Array.<Phaser.GameObjects.GameObject>

The Game Object, or array of Game Objects, to be removed from the Container.

destroyChild boolean <optional> false

Optionally call destroy on each child successfully removed from this Container.


This Container instance.

Since: 3.4.0