LDtkEntityInstance

@Serializable
data class LDtkEntityInstance(    val grid: List<Int>,     val identifier: String,     val pivot: List<Float>,     val tile: LDtkTileRect? = null,     val defUid: Int,     val fieldInstances: List<LDtkFieldInstance>,     val height: Int,     val px: List<Int>,     val width: Int,     val tags: List<String> = emptyList(),     val iid: String = "")

Constructors

Link copied to clipboard
fun LDtkEntityInstance(    grid: List<Int>,     identifier: String,     pivot: List<Float>,     tile: LDtkTileRect? = null,     defUid: Int,     fieldInstances: List<LDtkFieldInstance>,     height: Int,     px: List<Int>,     width: Int,     tags: List<String> = emptyList(),     iid: String = "")

Properties

Link copied to clipboard
val defUid: Int

Reference of the Entity definition UID

Link copied to clipboard

An array of all custom fields and their values.

Link copied to clipboard
val grid: List<Int>

Grid-based coordinates ([x,y] format)

Link copied to clipboard
val height: Int

Entity height in pixels. For non-resizable entities, it will be the same as Entity definition.

Link copied to clipboard

Entity definition identifier

Link copied to clipboard
val iid: String

Unique instance identifier

Link copied to clipboard

Pivot coordinates ([x,y] format, values are from 0 to 1) of the Entity

Link copied to clipboard
val px: List<Int>

Pixel coordinates ([x,y] format) in current level coordinate space. Don't forget optional layer offsets, if they exist!

Link copied to clipboard

List of tags defined

Link copied to clipboard
val tile: LDtkTileRect? = null

Optional Tile used to display this entity (it could either be the default Entity tile, or some tile provided by a field value, like an Enum).

Link copied to clipboard
val width: Int

Entity width in pixels. For non-resizable entities, it will be the same as Entity definition.