Show / Hide Table of Contents

Class EntityInstance

Json Instance Data

Properties

| Improve this Doc View Source

Definition

Type Description
EntityDefinition

Reference of this instance's definition.
Make sure to call LDtkUidBank.CacheUidData(LdtkJson) first!

| Improve this Doc View Source

DefUid

Reference of the Entity definition UID

Type Description
System.Int32
| Improve this Doc View Source

FieldInstances

An array of all custom fields and their values.

Type Description
FieldInstance[]
| Improve this Doc View Source

Grid

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

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

Height

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

Type Description
System.Int32
| Improve this Doc View Source

Identifier

Entity definition identifier

Type Description
System.String
| Improve this Doc View Source

Iid

Unique instance identifier

Type Description
System.String
| Improve this Doc View Source

Pivot

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

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

Px

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

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

SmartColor

The entity "smart" color, guessed from either Entity definition, or one its field instances.

Type Description
System.String
| Improve this Doc View Source

Tags

Array of tags defined in this Entity definition

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

Tile

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

Type Description
TilesetRectangle
| Improve this Doc View Source

UnityGrid

Type Description
UnityEngine.Vector2Int

Grid-based coordinates

| Improve this Doc View Source

UnityPivot

Type Description
UnityEngine.Vector2

Pivot coordinates of the Entity. (values are from 0 to 1)

| Improve this Doc View Source

UnityPx

Type Description
UnityEngine.Vector2Int

Pixel coordinates in current level coordinate space. Don't forget optional layer offsets, if they exist!

| Improve this Doc View Source

UnityScale

Type Description
UnityEngine.Vector3

Entity scale multiplier, suitable for a transform's scale.

| Improve this Doc View Source

UnitySize

Type Description
UnityEngine.Vector2Int

Entity size in pixels, adjusted for this instance's resizing.

| Improve this Doc View Source

UnitySmartColor

Type Description
UnityEngine.Color

The entity "smart" color, guessed from either Entity definition, or one its field instances.

| Improve this Doc View Source

UnityWorld

Type Description
UnityEngine.Vector2Int

World coordinate in pixels. Only available in GridVania or Free world layouts.

| Improve this Doc View Source

Width

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

Type Description
System.Int32
| Improve this Doc View Source

WorldX

X world coordinate in pixels. Only available in GridVania or Free world layouts.

Type Description
System.Nullable<System.Int32>
| Improve this Doc View Source

WorldY

Y world coordinate in pixels Only available in GridVania or Free world layouts.

Type Description
System.Nullable<System.Int32>
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX