Phaser API Documentation

  Version: 
removeFromDisplayList()

Description:

Removes this Layer from the Display List it is currently on.

A Layer can only exist on one Display List at any given time, but may move freely removed and added back at a later stage.

You can query which list it is on by looking at the Phaser.GameObjects.GameObject#displayList property.

If a Layer isn't on any Display List, it will not be rendered. If you just wish to temporarily disable it from rendering, consider using the setVisible method, instead.

Returns:
Description:

This Layer.

Since: 3.60.0