Phaser API Documentation

  Version: 
setExclusive([value])

Description:

Does this Container exclusively manage its children?

The default is true which means a child added to this Container cannot belong in another Container, which includes the Scene display list.

If you disable this then this Container will no longer exclusively manage its children. This allows you to create all kinds of interesting graphical effects, such as replicating Game Objects without reparenting them all over the Scene. However, doing so will prevent children from receiving any kind of input event or have their physics bodies work by default, as they're no longer a single entity on the display list, but are being replicated where-ever this Container is.

Parameters:

name type arguments Default description
value boolean <optional> true

The exclusive state of this Container.

Returns:
Description:

This Container.

Examples:
Since: 3.4.0