Class TileInstance
This structure represents a single tile from a given Tileset.
Properties
| Improve this Doc View SourceA
Alpha/opacity of the tile (0-1, defaults to 1)
Type | Description |
---|---|
System.Single |
AutoLayerCoordId
Type | Description |
---|---|
System.Int32 | The cell ID of this tile, much like the tile ID in a tileset. Ensure to get this value from an auto layer context! |
AutoLayerRuleDefinition
Type | Description |
---|---|
AutoLayerRuleDefinition | Reference of this tile's rule definition, only for AutoLayers! |
AutoLayerRuleId
Type | Description |
---|---|
System.Int32 | Rule definition uid. |
D
Internal data used by the editor.
For auto-layer tiles: [ruleId, coordId]
.
For tile-layer tiles: [coordId]
.
Type | Description |
---|---|
System.Int32[] |
F
"Flip bits", a 2-bits integer to represent the mirror transformations of the tile.
- Bit 0 = X flip
- Bit 1 = Y flip
Examples: f=0 (no flip), f=1 (X flip only), f=2 (Y flip only), f=3 (both flips)
Type | Description |
---|---|
System.Int32 |
FlipX
Type | Description |
---|---|
System.Boolean | X mirror transformation of the tile |
FlipY
Type | Description |
---|---|
System.Boolean | Y mirror transformation of the tile |
Px
Pixel coordinates of the tile in the layer ([x,y]
format). Don't forget optional
layer offsets, if they exist!
Type | Description |
---|---|
System.Int32[] |
Src
Pixel coordinates of the tile in the tileset ([x,y]
format)
Type | Description |
---|---|
System.Int32[] |
T
The Tile ID in the corresponding tileset.
Type | Description |
---|---|
System.Int32 |
TileLayerCoordId
Type | Description |
---|---|
System.Int32 | The cell ID of this tile, much like the tile ID in a tileset. Ensure to get this value from a tile layer context! |
UnityPx
Type | Description |
---|---|
UnityEngine.Vector2Int | Layer Pixel Position; Pixel coordinates of the tile in the layer. Don't forget optional layer offsets, if they exist! |
UnitySrc
Type | Description |
---|---|
UnityEngine.Vector2Int | Source Pixel Position; Pixel coordinates of the tile in the tileset |