Phaser API Documentation

  Version: 
getLayerIndexByName(name)

Description:

Gets the index of the LayerData within this.layers that has the given name, or null if an invalid name is given.

Parameters:

name type description
name string

The name of the layer to get.

Returns:
Description:

The LayerData index within this.layers.

Type:
  • number
Since: 3.0.0
Source: src/tilemaps/Tilemap.js (Line 1277)