reckfellENGINE

TileMapPattern

Holds a pattern to be copied from or pasted into TileMaps.

On this page
class TileMapPatternReckfellSharpInherits Resource

Holds a pattern to be copied from or pasted into TileMaps.

This resource holds a set of cells to help bulk manipulations of TileMap. A pattern always starts at the (0, 0) coordinates and cannot have cells with negative coordinates.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

TileMapPatternConstructor
# TileMapPattern
C#
public TileMapPattern();

Methods10

GetCellAlternativeTileint
# GetCellAlternativeTile
C#
public int GetCellAlternativeTile(Vector2I coords);

Returns the tile alternative ID of the cell at coords.

Parameters
NameTypeDefault
coordsVector2I—
Returns int
GetCellAtlasCoordsVector2I
# GetCellAtlasCoords
C#
public Vector2I GetCellAtlasCoords(Vector2I coords);

Returns the tile atlas coordinates ID of the cell at coords.

Parameters
NameTypeDefault
coordsVector2I—
Returns Vector2I
GetCellSourceIdint
# GetCellSourceId
C#
public int GetCellSourceId(Vector2I coords);

Returns the tile source ID of the cell at coords.

Parameters
NameTypeDefault
coordsVector2I—
Returns int
GetSizeVector2I
# GetSize
C#
public Vector2I GetSize();

Returns the size, in cells, of the pattern.

Returns Vector2I
GetUsedCellsReckfell.Collections.Array<Vector2I>
# GetUsedCells
C#
public Reckfell.Collections.Array<Vector2I> GetUsedCells();

Returns the list of used cell coordinates in the pattern.

Returns Reckfell.Collections.Array<Vector2I>
HasCellbool
# HasCell
C#
public bool HasCell(Vector2I coords);

Returns whether the pattern has a tile at the given coordinates.

Parameters
NameTypeDefault
coordsVector2I—
Returns bool
IsEmptybool
# IsEmpty
C#
public bool IsEmpty();

Returns whether the pattern is empty or not.

Returns bool
RemoveCellvoid
# RemoveCell
C#
public void RemoveCell(Vector2I coords, bool updateSize);

Remove the cell at the given coordinates.

Parameters
NameTypeDefault
coordsVector2I—
updateSizebool—
SetCellvoid
# SetCell
C#
public void SetCell(Vector2I coords, int sourceId = -1, Vector2I? atlasCoords = default, int alternativeTile = -1);

Sets the tile identifiers for the cell at coordinates coords. See TileMap.SetCell.

Parameters
NameTypeDefault
coordsVector2I—
sourceIdint-1
atlasCoordsVector2I?default
alternativeTileint-1
atlasCoords

If the parameter is null, then the default value is new Vector2I(-1, -1).

SetSizevoid
# SetSize
C#
public void SetSize(Vector2I size);

Sets the size of the pattern.

Parameters
NameTypeDefault
sizeVector2I—
Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.