TilemapLayer Class

Represents a single layer in a tilemap.

public class TilemapLayer

Inheritance System.Object → TilemapLayer

Properties
HasCollision Whether this layer generates collision.
Height Height of the layer in tiles.
Name Layer name (e.g., "background", "gameplay", "foreground").
Opacity Layer opacity (0.0 = invisible, 1.0 = fully visible).
Tiles 2D array of tiles [x, y].
Visible Whether this layer is visible.
Width Width of the layer in tiles.
ZOrder Rendering order (lower renders first/behind).
Methods
GetTile(int, int) Gets a tile at the specified position.
SetTile(int, int, Tile) Sets a tile at the specified position.