Show / Hide Table of Contents

Class TileInstance

This structure represents a single tile from a given Tileset.

Properties

| Improve this Doc View Source

A

Alpha/opacity of the tile (0-1, defaults to 1)

Type Description
System.Single
| Improve this Doc View Source

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!

| Improve this Doc View Source

AutoLayerRuleDefinition

Type Description
AutoLayerRuleDefinition

Reference of this tile's rule definition, only for AutoLayers!
Make sure to call LDtkUidBank.CacheUidData(LdtkJson) first!

| Improve this Doc View Source

AutoLayerRuleId

Type Description
System.Int32

Rule definition uid.
Ensure to get this value from an auto layer context!

| Improve this Doc View Source

D

Internal data used by the editor.
For auto-layer tiles: [ruleId, coordId].
For tile-layer tiles: [coordId].

Type Description
System.Int32[]
| Improve this Doc View Source

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
| Improve this Doc View Source

FlipX

Type Description
System.Boolean

X mirror transformation of the tile

| Improve this Doc View Source

FlipY

Type Description
System.Boolean

Y mirror transformation of the tile

| Improve this Doc View Source

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[]
| Improve this Doc View Source

Src

Pixel coordinates of the tile in the tileset ([x,y] format)

Type Description
System.Int32[]
| Improve this Doc View Source

T

The Tile ID in the corresponding tileset.

Type Description
System.Int32
| Improve this Doc View Source

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!

| Improve this Doc View Source

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!

| Improve this Doc View Source

UnitySrc

Type Description
UnityEngine.Vector2Int

Source Pixel Position; Pixel coordinates of the tile in the tileset

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX