reckfellENGINE

TileSet

Tile library for tilemaps.

On this page
class TileSetReckfellSharpInherits Resource

Tile library for tilemaps.

A TileSet is a library of tiles for a TileMapLayer. A TileSet handles a list of TileSetSource, each of them storing a set of tiles. Tiles can either be from a TileSetAtlasSource, which renders tiles out of a texture with support for physics, navigation, etc., or from a TileSetScenesCollectionSource, which exposes scene-based tiles. Tiles are referenced by using three IDs: their source ID, their atlas coordinates ID, and their alternative tile ID. A TileSet can be configured so that its tiles expose more or fewer properties. To do so, the TileSet resources use property layers, which you can add or remove depending on your needs. For example, adding a physics layer allows giving collision shapes to your tiles. Each layer has dedicated properties (physics layer and mask), so you may add several TileSet physics layers for each type of collision you need. See the functions to add new layers for more information.

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

Constructors1

TileSetConstructor
# TileSet
C#
public TileSet();

Properties5

TileLayoutProperty
# TileLayout
C#
public TileSet.TileLayoutEnum TileLayout { get; set; }

For all half-offset shapes (Isometric, Hexagonal and Half-Offset square), changes the way tiles are indexed in the TileMapLayer grid.

TileOffsetAxisProperty
# TileOffsetAxis
C#
public TileSet.TileOffsetAxisEnum TileOffsetAxis { get; set; }

For all half-offset shapes (Isometric, Hexagonal and Half-Offset square), determines the offset axis.

TileShapeProperty
# TileShape
C#
public TileSet.TileShapeEnum TileShape { get; set; }

The tile shape.

TileSizeProperty
# TileSize
C#
public Vector2I TileSize { get; set; }

Grid cell size used for layout and coordinate conversion. Not automatically the same as an atlas tile image size, which the source configures with TextureRegionSize. The example explicitly sets both to 16×16.

UVClippingProperty
# UVClipping
C#
public bool UVClipping { get; set; }

Enables/Disable uv clipping when rendering the tiles.

Methods90

AddCustomDataLayervoid
# AddCustomDataLayer
C#
public void AddCustomDataLayer(int toPosition = -1);

Adds a custom data layer to the TileSet at the given position to_position in the array. If to_position is -1, adds it at the end of the array. Custom data layers allow assigning custom properties to atlas tiles.

Parameters
NameTypeDefault
toPositionint-1
AddNavigationLayervoid
# AddNavigationLayer
C#
public void AddNavigationLayer(int toPosition = -1);

Adds a navigation layer to the TileSet at the given position to_position in the array. If to_position is -1, adds it at the end of the array. Navigation layers allow assigning a navigable area to atlas tiles.

Parameters
NameTypeDefault
toPositionint-1
AddOcclusionLayervoid
# AddOcclusionLayer
C#
public void AddOcclusionLayer(int toPosition = -1);

Adds an occlusion layer to the TileSet at the given position to_position in the array. If to_position is -1, adds it at the end of the array. Occlusion layers allow assigning occlusion polygons to atlas tiles.

Parameters
NameTypeDefault
toPositionint-1
AddPatternint
# AddPattern
C#
public int AddPattern(TileMapPattern pattern, int index = -1);

Adds a TileMapPattern to be stored in the TileSet resource. If provided, insert it at the given index.

Parameters
NameTypeDefault
patternTileMapPattern—
indexint-1
Returns int
AddPhysicsLayervoid
# AddPhysicsLayer
C#
public void AddPhysicsLayer(int toPosition = -1);

Adds a physics layer to the TileSet at the given position to_position in the array. If to_position is -1, adds it at the end of the array. Physics layers allow assigning collision polygons to atlas tiles.

Parameters
NameTypeDefault
toPositionint-1
AddSourceint
# AddSource
C#
public int AddSource(TileSetSource source, int atlasSourceIdOverride = -1);

Adds a TileSetSource to the TileSet. If atlas_source_id_override is not -1, also set its source ID. Otherwise, a unique identifier is automatically generated. The function returns the added source ID or -1 if the source could not be added. Warning: A source cannot belong to two TileSets at the same time. If the added source was attached to another TileSet, it will be removed from that one.

Parameters
NameTypeDefault
sourceTileSetSource—
atlasSourceIdOverrideint-1
Returns int
AddTerrainvoid
# AddTerrain
C#
public void AddTerrain(int terrainSet, int toPosition = -1);

Adds a new terrain to the given terrain set terrain_set at the given position to_position in the array. If to_position is -1, adds it at the end of the array.

Parameters
NameTypeDefault
terrainSetint—
toPositionint-1
AddTerrainSetvoid
# AddTerrainSet
C#
public void AddTerrainSet(int toPosition = -1);

Adds a new terrain set at the given position to_position in the array. If to_position is -1, adds it at the end of the array.

Parameters
NameTypeDefault
toPositionint-1
CleanupInvalidTileProxiesvoid
# CleanupInvalidTileProxies
C#
public void CleanupInvalidTileProxies();

Clears tile proxies pointing to invalid tiles.

ClearTerrainsvoid
# ClearTerrains
C#
public void ClearTerrains(int terrainSet);

Clears all terrain properties for the given terrain set.

Parameters
NameTypeDefault
terrainSetint—
ClearTileProxiesvoid
# ClearTileProxies
C#
public void ClearTileProxies();

Clears all tile proxies.

GetAlternativeLevelTileProxyReckfell.Collections.Array
# GetAlternativeLevelTileProxy
C#
public Reckfell.Collections.Array GetAlternativeLevelTileProxy(int sourceFrom, Vector2I coordsFrom, int alternativeFrom);

Returns the alternative-level proxy for the given identifiers. The returned array contains the three proxies' target identifiers (source ID, atlas coordinate ID, and alternative tile ID). If the TileSet has no proxy for the given identifiers, returns an empty Array.

Parameters
NameTypeDefault
sourceFromint—
coordsFromVector2I—
alternativeFromint—
Returns Reckfell.Collections.Array
GetCoordsLevelTileProxyReckfell.Collections.Array
# GetCoordsLevelTileProxy
C#
public Reckfell.Collections.Array GetCoordsLevelTileProxy(int sourceFrom, Vector2I coordsFrom);

Returns the coordinate-level proxy for the given identifiers. The returned array contains the two target identifiers of the proxy (source ID and atlas coordinates ID). If the TileSet has no proxy for the given identifiers, returns an empty Array.

Parameters
NameTypeDefault
sourceFromint—
coordsFromVector2I—
Returns Reckfell.Collections.Array
GetCustomDataLayerByNameint
# GetCustomDataLayerByName
C#
public int GetCustomDataLayerByName(string layerName);

Returns the index of the custom data layer identified by the given name.

Parameters
NameTypeDefault
layerNamestring—
Returns int
GetCustomDataLayerNamestring
# GetCustomDataLayerName
C#
public string GetCustomDataLayerName(int layerIndex);

Returns the name of the custom data layer identified by the given index.

Parameters
NameTypeDefault
layerIndexint—
Returns string
GetCustomDataLayerTypeVariant.Type
# GetCustomDataLayerType
C#
public Variant.Type GetCustomDataLayerType(int layerIndex);

Returns the type of the custom data layer identified by the given index.

Parameters
NameTypeDefault
layerIndexint—
Returns Variant.Type
GetCustomDataLayersCountint
# GetCustomDataLayersCount
C#
public int GetCustomDataLayersCount();

Returns the custom data layers count.

Returns int
GetNavigationLayerLayerValuebool
# GetNavigationLayerLayerValue
C#
public bool GetNavigationLayerLayerValue(int layerIndex, int layerNumber);

Returns whether or not the specified navigation layer of the TileSet navigation data layer identified by the given layer_index is enabled, given a navigation_layers layer_number between 1 and 32.

Parameters
NameTypeDefault
layerIndexint—
layerNumberint—
Returns bool
GetNavigationLayerLayersuint
# GetNavigationLayerLayers
C#
public uint GetNavigationLayerLayers(int layerIndex);

Returns the navigation layers (as in the Navigation server) of the given TileSet navigation layer.

Parameters
NameTypeDefault
layerIndexint—
Returns uint
GetNavigationLayersCountint
# GetNavigationLayersCount
C#
public int GetNavigationLayersCount();

Returns the navigation layers count.

Returns int
GetNextSourceIdint
# GetNextSourceId
C#
public int GetNextSourceId();

Returns a new unused source ID. This generated ID is the same that a call to TileSet.AddSource would return.

Returns int
GetOcclusionLayerLightMaskint
# GetOcclusionLayerLightMask
C#
public int GetOcclusionLayerLightMask(int layerIndex);

Returns the light mask of the occlusion layer.

Parameters
NameTypeDefault
layerIndexint—
Returns int
GetOcclusionLayerSdfCollisionbool
# GetOcclusionLayerSdfCollision
C#
public bool GetOcclusionLayerSdfCollision(int layerIndex);

Returns if the occluders from this layer use sdf_collision.

Parameters
NameTypeDefault
layerIndexint—
Returns bool
GetOcclusionLayersCountint
# GetOcclusionLayersCount
C#
public int GetOcclusionLayersCount();

Returns the occlusion layers count.

Returns int
GetPatternTileMapPattern
# GetPattern
C#
public TileMapPattern GetPattern(int index = -1);

Returns the TileMapPattern at the given index.

Parameters
NameTypeDefault
indexint-1
Returns TileMapPattern
GetPatternsCountint
# GetPatternsCount
C#
public int GetPatternsCount();

Returns the number of TileMapPattern this tile set handles.

Returns int
GetPhysicsLayerCollisionLayeruint
# GetPhysicsLayerCollisionLayer
C#
public uint GetPhysicsLayerCollisionLayer(int layerIndex);

Returns the collision layer (as in the physics server) bodies on the given TileSet's physics layer are in.

Parameters
NameTypeDefault
layerIndexint—
Returns uint
GetPhysicsLayerCollisionMaskuint
# GetPhysicsLayerCollisionMask
C#
public uint GetPhysicsLayerCollisionMask(int layerIndex);

Returns the collision mask of bodies on the given TileSet's physics layer.

Parameters
NameTypeDefault
layerIndexint—
Returns uint
GetPhysicsLayerCollisionPriorityfloat
# GetPhysicsLayerCollisionPriority
C#
public float GetPhysicsLayerCollisionPriority(int layerIndex);

Returns the collision priority of bodies on the given TileSet's physics layer.

Parameters
NameTypeDefault
layerIndexint—
Returns float
GetPhysicsLayerPhysicsMaterialPhysicsMaterial
# GetPhysicsLayerPhysicsMaterial
C#
public PhysicsMaterial GetPhysicsLayerPhysicsMaterial(int layerIndex);

Returns the physics material of bodies on the given TileSet's physics layer.

Parameters
NameTypeDefault
layerIndexint—
Returns PhysicsMaterial
GetPhysicsLayersCountint
# GetPhysicsLayersCount
C#
public int GetPhysicsLayersCount();

Returns the physics layers count.

Returns int
GetSourceTileSetSource
# GetSource
C#
public TileSetSource GetSource(int sourceId);

Returns the TileSetSource with ID source_id.

Parameters
NameTypeDefault
sourceIdint—
Returns TileSetSource
GetSourceCountint
# GetSourceCount
C#
public int GetSourceCount();

Returns the number of TileSetSource in this TileSet.

Returns int
GetSourceIdint
# GetSourceId
C#
public int GetSourceId(int index);

Returns the source ID for source with index index.

Parameters
NameTypeDefault
indexint—
Returns int
GetSourceLevelTileProxyint
# GetSourceLevelTileProxy
C#
public int GetSourceLevelTileProxy(int sourceFrom);

Returns the source-level proxy for the given source identifier. If the TileSet has no proxy for the given identifier, returns -1.

Parameters
NameTypeDefault
sourceFromint—
Returns int
GetTerrainColorColor
# GetTerrainColor
C#
public Color GetTerrainColor(int terrainSet, int terrainIndex);

Returns a terrain's color.

Parameters
NameTypeDefault
terrainSetint—
terrainIndexint—
Returns Color
GetTerrainNamestring
# GetTerrainName
C#
public string GetTerrainName(int terrainSet, int terrainIndex);

Returns a terrain's name.

Parameters
NameTypeDefault
terrainSetint—
terrainIndexint—
Returns string
GetTerrainSetModeTileSet.TerrainMode
# GetTerrainSetMode
C#
public TileSet.TerrainMode GetTerrainSetMode(int terrainSet);

Returns a terrain set mode.

Parameters
NameTypeDefault
terrainSetint—
Returns TileSet.TerrainMode
GetTerrainSetsCountint
# GetTerrainSetsCount
C#
public int GetTerrainSetsCount();

Returns the terrain sets count.

Returns int
GetTerrainsCountint
# GetTerrainsCount
C#
public int GetTerrainsCount(int terrainSet);

Returns the number of terrains in the given terrain set.

Parameters
NameTypeDefault
terrainSetint—
Returns int
GetTileLayoutTileSet.TileLayoutEnum
# GetTileLayout
C#
public TileSet.TileLayoutEnum GetTileLayout();
Returns TileSet.TileLayoutEnum
GetTileOffsetAxisTileSet.TileOffsetAxisEnum
# GetTileOffsetAxis
C#
public TileSet.TileOffsetAxisEnum GetTileOffsetAxis();
Returns TileSet.TileOffsetAxisEnum
GetTileShapeTileSet.TileShapeEnum
# GetTileShape
C#
public TileSet.TileShapeEnum GetTileShape();
Returns TileSet.TileShapeEnum
GetTileSizeVector2I
# GetTileSize
C#
public Vector2I GetTileSize();
Returns Vector2I
HasAlternativeLevelTileProxybool
# HasAlternativeLevelTileProxy
C#
public bool HasAlternativeLevelTileProxy(int sourceFrom, Vector2I coordsFrom, int alternativeFrom);

Returns if there is an alternative-level proxy for the given identifiers.

Parameters
NameTypeDefault
sourceFromint—
coordsFromVector2I—
alternativeFromint—
Returns bool
HasCoordsLevelTileProxybool
# HasCoordsLevelTileProxy
C#
public bool HasCoordsLevelTileProxy(int sourceFrom, Vector2I coordsFrom);

Returns if there is a coodinates-level proxy for the given identifiers.

Parameters
NameTypeDefault
sourceFromint—
coordsFromVector2I—
Returns bool
HasCustomDataLayerByNamebool
# HasCustomDataLayerByName
C#
public bool HasCustomDataLayerByName(string layerName);

Returns if there is a custom data layer named layer_name.

Parameters
NameTypeDefault
layerNamestring—
Returns bool
HasSourcebool
# HasSource
C#
public bool HasSource(int sourceId);

Returns if this TileSet has a source for the given source ID.

Parameters
NameTypeDefault
sourceIdint—
Returns bool
HasSourceLevelTileProxybool
# HasSourceLevelTileProxy
C#
public bool HasSourceLevelTileProxy(int sourceFrom);

Returns if there is a source-level proxy for the given source ID.

Parameters
NameTypeDefault
sourceFromint—
Returns bool
IsUVClippingbool
# IsUVClipping
C#
public bool IsUVClipping();
Returns bool
MapTileProxyReckfell.Collections.Array
# MapTileProxy
C#
public Reckfell.Collections.Array MapTileProxy(int sourceFrom, Vector2I coordsFrom, int alternativeFrom);

According to the configured proxies, maps the provided identifiers to a new set of identifiers. The source ID, atlas coordinates ID and alternative tile ID are returned as a 3 elements Array. This function first look for matching alternative-level proxies, then coordinates-level proxies, then source-level proxies. If no proxy corresponding to provided identifiers are found, returns the same values the ones used as arguments.

Parameters
NameTypeDefault
sourceFromint—
coordsFromVector2I—
alternativeFromint—
Returns Reckfell.Collections.Array
MoveCustomDataLayervoid
# MoveCustomDataLayer
C#
public void MoveCustomDataLayer(int layerIndex, int toPosition);

Moves the custom data layer at index layer_index to the given position to_position in the array. Also updates the atlas tiles accordingly.

Parameters
NameTypeDefault
layerIndexint—
toPositionint—
MoveNavigationLayervoid
# MoveNavigationLayer
C#
public void MoveNavigationLayer(int layerIndex, int toPosition);

Moves the navigation layer at index layer_index to the given position to_position in the array. Also updates the atlas tiles accordingly.

Parameters
NameTypeDefault
layerIndexint—
toPositionint—
MoveOcclusionLayervoid
# MoveOcclusionLayer
C#
public void MoveOcclusionLayer(int layerIndex, int toPosition);

Moves the occlusion layer at index layer_index to the given position to_position in the array. Also updates the atlas tiles accordingly.

Parameters
NameTypeDefault
layerIndexint—
toPositionint—
MovePhysicsLayervoid
# MovePhysicsLayer
C#
public void MovePhysicsLayer(int layerIndex, int toPosition);

Moves the physics layer at index layer_index to the given position to_position in the array. Also updates the atlas tiles accordingly.

Parameters
NameTypeDefault
layerIndexint—
toPositionint—
MoveTerrainvoid
# MoveTerrain
C#
public void MoveTerrain(int terrainSet, int terrainIndex, int toPosition);

Moves the terrain at index terrain_index for terrain set terrain_set to the given position to_position in the array. Also updates the atlas tiles accordingly.

Parameters
NameTypeDefault
terrainSetint—
terrainIndexint—
toPositionint—
MoveTerrainSetvoid
# MoveTerrainSet
C#
public void MoveTerrainSet(int terrainSet, int toPosition);

Moves the terrain set at index terrain_set to the given position to_position in the array. Also updates the atlas tiles accordingly.

Parameters
NameTypeDefault
terrainSetint—
toPositionint—
RemoveAlternativeLevelTileProxyvoid
# RemoveAlternativeLevelTileProxy
C#
public void RemoveAlternativeLevelTileProxy(int sourceFrom, Vector2I coordsFrom, int alternativeFrom);

Removes an alternative-level proxy for the given identifiers.

Parameters
NameTypeDefault
sourceFromint—
coordsFromVector2I—
alternativeFromint—
RemoveCoordsLevelTileProxyvoid
# RemoveCoordsLevelTileProxy
C#
public void RemoveCoordsLevelTileProxy(int sourceFrom, Vector2I coordsFrom);

Removes a coordinates-level proxy for the given identifiers.

Parameters
NameTypeDefault
sourceFromint—
coordsFromVector2I—
RemoveCustomDataLayervoid
# RemoveCustomDataLayer
C#
public void RemoveCustomDataLayer(int layerIndex);

Removes the custom data layer at index layer_index. Also updates the atlas tiles accordingly.

Parameters
NameTypeDefault
layerIndexint—
RemoveNavigationLayervoid
# RemoveNavigationLayer
C#
public void RemoveNavigationLayer(int layerIndex);

Removes the navigation layer at index layer_index. Also updates the atlas tiles accordingly.

Parameters
NameTypeDefault
layerIndexint—
RemoveOcclusionLayervoid
# RemoveOcclusionLayer
C#
public void RemoveOcclusionLayer(int layerIndex);

Removes the occlusion layer at index layer_index. Also updates the atlas tiles accordingly.

Parameters
NameTypeDefault
layerIndexint—
RemovePatternvoid
# RemovePattern
C#
public void RemovePattern(int index);

Remove the TileMapPattern at the given index.

Parameters
NameTypeDefault
indexint—
RemovePhysicsLayervoid
# RemovePhysicsLayer
C#
public void RemovePhysicsLayer(int layerIndex);

Removes the physics layer at index layer_index. Also updates the atlas tiles accordingly.

Parameters
NameTypeDefault
layerIndexint—
RemoveSourcevoid
# RemoveSource
C#
public void RemoveSource(int sourceId);

Removes the source with the given source ID.

Parameters
NameTypeDefault
sourceIdint—
RemoveSourceLevelTileProxyvoid
# RemoveSourceLevelTileProxy
C#
public void RemoveSourceLevelTileProxy(int sourceFrom);

Removes a source-level tile proxy.

Parameters
NameTypeDefault
sourceFromint—
RemoveTerrainvoid
# RemoveTerrain
C#
public void RemoveTerrain(int terrainSet, int terrainIndex);

Removes the terrain at index terrain_index in the given terrain set terrain_set. Also updates the atlas tiles accordingly.

Parameters
NameTypeDefault
terrainSetint—
terrainIndexint—
RemoveTerrainSetvoid
# RemoveTerrainSet
C#
public void RemoveTerrainSet(int terrainSet);

Removes the terrain set at index terrain_set. Also updates the atlas tiles accordingly.

Parameters
NameTypeDefault
terrainSetint—
SetAlternativeLevelTileProxyvoid
# SetAlternativeLevelTileProxy
C#
public void SetAlternativeLevelTileProxy(int sourceFrom, Vector2I coordsFrom, int alternativeFrom, int sourceTo, Vector2I coordsTo, int alternativeTo);

Create an alternative-level proxy for the given identifiers. A proxy will map set of tile identifiers to another set of identifiers. Proxied tiles can be automatically replaced in TileMapLayer nodes using the editor.

Parameters
NameTypeDefault
sourceFromint—
coordsFromVector2I—
alternativeFromint—
sourceToint—
coordsToVector2I—
alternativeToint—
SetCoordsLevelTileProxyvoid
# SetCoordsLevelTileProxy
C#
public void SetCoordsLevelTileProxy(int sourceFrom, Vector2I coordsFrom, int sourceTo, Vector2I coordsTo);

Creates a coordinates-level proxy for the given identifiers. A proxy will map set of tile identifiers to another set of identifiers. The alternative tile ID is kept the same when using coordinates-level proxies. Proxied tiles can be automatically replaced in TileMapLayer nodes using the editor.

Parameters
NameTypeDefault
sourceFromint—
coordsFromVector2I—
sourceToint—
coordsToVector2I—
SetCustomDataLayerNamevoid
# SetCustomDataLayerName
C#
public void SetCustomDataLayerName(int layerIndex, string layerName);

Sets the name of the custom data layer identified by the given index. Names are identifiers of the layer therefore if the name is already taken it will fail and raise an error.

Parameters
NameTypeDefault
layerIndexint—
layerNamestring—
SetCustomDataLayerTypevoid
# SetCustomDataLayerType
C#
public void SetCustomDataLayerType(int layerIndex, Variant.Type layerType);

Sets the type of the custom data layer identified by the given index.

Parameters
NameTypeDefault
layerIndexint—
layerTypeVariant.Type—
SetNavigationLayerLayerValuevoid
# SetNavigationLayerLayerValue
C#
public void SetNavigationLayerLayerValue(int layerIndex, int layerNumber, bool value);

Based on value, enables or disables the specified navigation layer of the TileSet navigation data layer identified by the given layer_index, given a navigation_layers layer_number between 1 and 32.

Parameters
NameTypeDefault
layerIndexint—
layerNumberint—
valuebool—
SetNavigationLayerLayersvoid
# SetNavigationLayerLayers
C#
public void SetNavigationLayerLayers(int layerIndex, uint layers);

Sets the navigation layers (as in the navigation server) for navigation regions in the given TileSet navigation layer.

Parameters
NameTypeDefault
layerIndexint—
layersuint—
SetOcclusionLayerLightMaskvoid
# SetOcclusionLayerLightMask
C#
public void SetOcclusionLayerLightMask(int layerIndex, int lightMask);

Sets the occlusion layer (as in the rendering server) for occluders in the given TileSet occlusion layer.

Parameters
NameTypeDefault
layerIndexint—
lightMaskint—
SetOcclusionLayerSdfCollisionvoid
# SetOcclusionLayerSdfCollision
C#
public void SetOcclusionLayerSdfCollision(int layerIndex, bool sdfCollision);

Enables or disables SDF collision for occluders in the given TileSet occlusion layer.

Parameters
NameTypeDefault
layerIndexint—
sdfCollisionbool—
SetPhysicsLayerCollisionLayervoid
# SetPhysicsLayerCollisionLayer
C#
public void SetPhysicsLayerCollisionLayer(int layerIndex, uint layer);

Sets the collision layer (as in the physics server) for bodies in the given TileSet physics layer.

Parameters
NameTypeDefault
layerIndexint—
layeruint—
SetPhysicsLayerCollisionMaskvoid
# SetPhysicsLayerCollisionMask
C#
public void SetPhysicsLayerCollisionMask(int layerIndex, uint mask);

Sets the collision mask for bodies in the given TileSet physics layer.

Parameters
NameTypeDefault
layerIndexint—
maskuint—
SetPhysicsLayerCollisionPriorityvoid
# SetPhysicsLayerCollisionPriority
C#
public void SetPhysicsLayerCollisionPriority(int layerIndex, float priority);

Sets the collision priority for bodies in the given TileSet physics layer.

Parameters
NameTypeDefault
layerIndexint—
priorityfloat—
SetPhysicsLayerPhysicsMaterialvoid
# SetPhysicsLayerPhysicsMaterial
C#
public void SetPhysicsLayerPhysicsMaterial(int layerIndex, PhysicsMaterial physicsMaterial);

Sets the physics material for bodies in the given TileSet physics layer.

Parameters
NameTypeDefault
layerIndexint—
physicsMaterialPhysicsMaterial—
SetSourceIdvoid
# SetSourceId
C#
public void SetSourceId(int sourceId, int newSourceId);

Changes a source's ID.

Parameters
NameTypeDefault
sourceIdint—
newSourceIdint—
SetSourceLevelTileProxyvoid
# SetSourceLevelTileProxy
C#
public void SetSourceLevelTileProxy(int sourceFrom, int sourceTo);

Creates a source-level proxy for the given source ID. A proxy will map set of tile identifiers to another set of identifiers. Both the atlas coordinates ID and the alternative tile ID are kept the same when using source-level proxies. Proxied tiles can be automatically replaced in TileMapLayer nodes using the editor.

Parameters
NameTypeDefault
sourceFromint—
sourceToint—
SetTerrainColorvoid
# SetTerrainColor
C#
public void SetTerrainColor(int terrainSet, int terrainIndex, Color color);

Sets a terrain's color. This color is used for identifying the different terrains in the TileSet editor.

Parameters
NameTypeDefault
terrainSetint—
terrainIndexint—
colorColor—
SetTerrainNamevoid
# SetTerrainName
C#
public void SetTerrainName(int terrainSet, int terrainIndex, string name);

Sets a terrain's name.

Parameters
NameTypeDefault
terrainSetint—
terrainIndexint—
namestring—
SetTerrainSetModevoid
# SetTerrainSetMode
C#
public void SetTerrainSetMode(int terrainSet, TileSet.TerrainMode mode);

Sets a terrain mode. Each mode determines which bits of a tile shape is used to match the neighboring tiles' terrains.

Parameters
NameTypeDefault
terrainSetint—
modeTileSet.TerrainMode—
SetTileLayoutvoid
# SetTileLayout
C#
public void SetTileLayout(TileSet.TileLayoutEnum layout);
Parameters
NameTypeDefault
layoutTileSet.TileLayoutEnum—
SetTileOffsetAxisvoid
# SetTileOffsetAxis
C#
public void SetTileOffsetAxis(TileSet.TileOffsetAxisEnum alignment);
Parameters
NameTypeDefault
alignmentTileSet.TileOffsetAxisEnum—
SetTileShapevoid
# SetTileShape
C#
public void SetTileShape(TileSet.TileShapeEnum shape);
Parameters
NameTypeDefault
shapeTileSet.TileShapeEnum—
SetTileSizevoid
# SetTileSize
C#
public void SetTileSize(Vector2I size);
Parameters
NameTypeDefault
sizeVector2I—
SetUVClippingvoid
# SetUVClipping
C#
public void SetUVClipping(bool uVClipping);
Parameters
NameTypeDefault
uVClippingbool—

TileSet.CellNeighbor

ValueDescription
BottomCorner = 5

Neighbor in the bottom corner.

BottomLeftCorner = 7

Neighbor in the bottom left corner.

BottomLeftSide = 6

Neighbor on the bottom left side.

BottomRightCorner = 3

Neighbor in the bottom right corner.

BottomRightSide = 2

Neighbor on the bottom right side.

BottomSide = 4

Neighbor on the bottom side.

LeftCorner = 9

Neighbor in the left corner.

LeftSide = 8

Neighbor on the left side.

RightCorner = 1

Neighbor in the right corner.

RightSide = 0

Neighbor on the right side.

TopCorner = 13

Neighbor in the top corner.

TopLeftCorner = 11

Neighbor in the top left corner.

TopLeftSide = 10

Neighbor on the top left side.

TopRightCorner = 15

Neighbor in the top right corner.

TopRightSide = 14

Neighbor on the top right side.

TopSide = 12

Neighbor on the top side.

TileSet.TerrainMode

ValueDescription
Corners = 1

Requires corners to match with neighboring tiles' terrains.

CornersAndSides = 0

Requires both corners and side to match with neighboring tiles' terrains.

Sides = 2

Requires sides to match with neighboring tiles' terrains.

TileSet.TileLayoutEnum

ValueDescription
DiamondDown = 5

Tile coordinates layout where the horizontal axis goes down-right, and the vertical one goes down-left.

DiamondRight = 4

Tile coordinates layout where the horizontal axis goes up-right, and the vertical one goes down-right.

Stacked = 0

Tile coordinates layout where both axis stay consistent with their respective local horizontal and vertical axis.

StackedOffset = 1

Same as TileSet.TileLayoutEnum.Stacked, but the first half-offset is negative instead of positive.

StairsDown = 3

Tile coordinates layout where the vertical axis stay vertical, and the horizontal one goes down-right.

StairsRight = 2

Tile coordinates layout where the horizontal axis stay horizontal, and the vertical one goes down-right.

TileSet.TileOffsetAxisEnum

ValueDescription
Horizontal = 0

Horizontal half-offset.

Vertical = 1

Vertical half-offset.

TileSet.TileShapeEnum

ValueDescription
HalfOffsetSquare = 2

Rectangular tile shape with one row/column out of two offset by half a tile.

Hexagon = 3

Hexagonal tile shape.

Isometric = 1

Diamond tile shape (for isometric look). Note: Isometric TileSet works best if all sibling TileMapLayers and their parent inheriting from Entity2D have Y-sort enabled.

Square = 0

Rectangular tile shape.

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.