Phaser API Documentation

  Version: 
remove(child, [destroyChild])

Description:

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.

Parameters:

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.

Returns:
Description:

This Container instance.

Examples:
Since: 3.4.0