Phaser API Documentation

  Version: 
getDisplayList()

Description:

Returns a reference to the underlying display list array that contains this Game Object, which will be either the Scene's Display List or the internal list belonging to its parent Container, if it has one.

If this Game Object is not on a display list or in a container, it will return null.

You should be very careful with this method, and understand that it returns a direct reference to the internal array used by the Display List. Mutating this array directly can cause all kinds of subtle and difficult to debug issues in your game.

Returns:
Description:

The internal Display List array of Game Objects, or null.

Since: 3.85.0