Phaser API Documentation

  Version: 
removeLayer([layer])

Description:

Removes the given TilemapLayer from this Tilemap without destroying it.

If no layer is specified, the maps current layer is used.

Parameters:

name type arguments description
layer string | number | Phaser.Tilemaps.TilemapLayer <optional>

The tile layer to be removed.

Returns:
Description:

Returns this, or null if the layer given was invalid.

Since: 3.17.0
Source: src/tilemaps/Tilemap.js (Line 1725)