Struct TileSet

Tile library for tilemaps.

struct TileSet ;

A TileSet is a library of tiles for a TileMap. It contains a list of tiles, each consisting of a sprite and optional collision shapes. Tiles are referenced by a unique integer ID.

Methods

NameDescription
_forwardAtlasSubtileSelection
_forwardSubtileSelection
_isTileBound
autotileClearBitmaskMap Clears all bitmask information of the autotile.
autotileGetBitmask Returns the bitmask of the subtile from an autotile given its coordinates. The value is the sum of the values in autotilebindings present in the subtile (e.g. a value of 5 means the bitmask has bindings in both the top left and top right).
autotileGetBitmaskMode Returns the bitmaskmode of the autotile.
autotileGetIconCoordinate Returns the subtile that's being used as an icon in an atlas/autotile given its coordinates. The subtile defined as the icon will be used as a fallback when the atlas/autotile's bitmask information is incomplete. It will also be used to represent it in the TileSet editor.
autotileGetLightOccluder Returns the light occluder of the subtile from an atlas/autotile given its coordinates.
autotileGetNavigationPolygon Returns the navigation polygon of the subtile from an atlas/autotile given its coordinates.
autotileGetSize Returns the size of the subtiles in an atlas/autotile.
autotileGetSpacing Returns the spacing between subtiles of the atlas/autotile.
autotileGetSubtilePriority Returns the priority of the subtile from an autotile given its coordinates. When more than one subtile has the same bitmask value, one of them will be picked randomly for drawing. Its priority will define how often it will be picked.
autotileGetZIndex Returns the drawing index of the subtile from an atlas/autotile given its coordinates.
autotileSetBitmask Sets the bitmask of the subtile from an autotile given its coordinates. The value is the sum of the values in autotilebindings present in the subtile (e.g. a value of 5 means the bitmask has bindings in both the top left and top right).
autotileSetBitmaskMode Sets the bitmaskmode of the autotile.
autotileSetIconCoordinate Sets the subtile that will be used as an icon in an atlas/autotile given its coordinates. The subtile defined as the icon will be used as a fallback when the atlas/autotile's bitmask information is incomplete. It will also be used to represent it in the TileSet editor.
autotileSetLightOccluder Sets the light occluder of the subtile from an atlas/autotile given its coordinates.
autotileSetNavigationPolygon Sets the navigation polygon of the subtile from an atlas/autotile given its coordinates.
autotileSetSize Sets the size of the subtiles in an atlas/autotile.
autotileSetSpacing Sets the spacing between subtiles of the atlas/autotile.
autotileSetSubtilePriority Sets the priority of the subtile from an autotile given its coordinates. When more than one subtile has the same bitmask value, one of them will be picked randomly for drawing. Its priority will define how often it will be picked.
autotileSetZIndex Sets the drawing index of the subtile from an atlas/autotile given its coordinates.
clear Clears all tiles.
createTile Creates a new tile with the given ID.
findTileByName Returns the first tile matching the given name.
getLastUnusedTileId Returns the ID following the last currently used ID, useful when creating a new tile.
getTilesIds Returns an array of all currently used tile IDs.
removeTile Removes the given tile ID.
tileAddShape Adds a shape to the tile.
tileGetLightOccluder Returns the tile's light occluder.
tileGetMaterial Returns the tile's material.
tileGetModulate Returns the tile's modulation color.
tileGetName Returns the tile's name.
tileGetNavigationPolygon Returns the navigation polygon of the tile.
tileGetNavigationPolygonOffset Returns the offset of the tile's navigation polygon.
tileGetNormalMap Returns the tile's normal map texture.
tileGetOccluderOffset Returns the offset of the tile's light occluder.
tileGetRegion Returns the tile sub-region in the texture.
tileGetShape Returns a tile's given shape.
tileGetShapeCount Returns the number of shapes assigned to a tile.
tileGetShapeOffset Returns the offset of a tile's shape.
tileGetShapeOneWay Returns the one-way collision value of a tile's shape.
tileGetShapeOneWayMargin
tileGetShapes Returns an array of the tile's shapes.
tileGetShapeTransform Returns the Transform2D of a tile's shape.
tileGetTexture Returns the tile's texture.
tileGetTextureOffset Returns the texture offset of the tile.
tileGetTileMode Returns the tile's tilemode.
tileGetZIndex Returns the tile's Z index (drawing layer).
tileSetLightOccluder Sets a light occluder for the tile.
tileSetMaterial Sets the tile's material.
tileSetModulate Sets the tile's modulation color.
tileSetName Sets the tile's name.
tileSetNavigationPolygon Sets the tile's navigation polygon.
tileSetNavigationPolygonOffset Sets an offset for the tile's navigation polygon.
tileSetNormalMap Sets the tile's normal map texture.
tileSetOccluderOffset Sets an offset for the tile's light occluder.
tileSetRegion Sets the tile's sub-region in the texture. This is common in texture atlases.
tileSetShape Sets a shape for the tile, enabling collision.
tileSetShapeOffset Sets the offset of a tile's shape.
tileSetShapeOneWay Enables one-way collision on a tile's shape.
tileSetShapeOneWayMargin
tileSetShapes Sets an array of shapes for the tile, enabling collision.
tileSetShapeTransform Sets a Transform2D on a tile's shape.
tileSetTexture Sets the tile's texture.
tileSetTextureOffset Sets the tile's texture offset.
tileSetTileMode Sets the tile's tilemode.
tileSetZIndex Sets the tile's drawing index.

Enums

NameDescription
AutotileBindings
BitmaskMode
Constants
TileMode