Table of Contents

Method GetLayer

Namespace
MonoGame.Aseprite
Assembly
MonoGame.Aseprite.dll

GetLayer(int)

Get the TilemapLayer element at the specified index in this Tilemap.

public TilemapLayer GetLayer(int index)

Parameters

index int

The index of the TilemapLayer element to locate.

Returns

TilemapLayer

The TilemapLayer element located.

Exceptions

ArgumentOutOfRangeException

Thrown if the specified index is less than zero or is greater than or equal to the total number of TilemapLayer elements in this Tilemap.

GetLayer(string)

Gets the TilemapLayer element with the specified name in this Tilemap.

public TilemapLayer GetLayer(string name)

Parameters

name string

The name of the TilemapLayer element to locate.

Returns

TilemapLayer

The TilemapLayer located.

Exceptions

KeyNotFoundException

Thrown if this Tilemap does not contain a TilemapLayer element with the specified name.