Class EntityInstance
Json Instance Data
Properties
| Improve this Doc View SourceDefinition
Type | Description |
---|---|
EntityDefinition | Reference of this instance's definition. |
DefUid
Reference of the Entity definition UID
Type | Description |
---|---|
System.Int32 |
FieldInstances
An array of all custom fields and their values.
Type | Description |
---|---|
FieldInstance[] |
Grid
Grid-based coordinates ([x,y]
format)
Type | Description |
---|---|
System.Int32[] |
Height
Entity height in pixels. For non-resizable entities, it will be the same as Entity definition.
Type | Description |
---|---|
System.Int32 |
Identifier
Entity definition identifier
Type | Description |
---|---|
System.String |
Iid
Unique instance identifier
Type | Description |
---|---|
System.String |
Pivot
Pivot coordinates ([x,y]
format, values are from 0 to 1) of the Entity
Type | Description |
---|---|
System.Single[] |
Px
Pixel coordinates ([x,y]
format) in current level coordinate space. Don't forget
optional layer offsets, if they exist!
Type | Description |
---|---|
System.Int32[] |
SmartColor
The entity "smart" color, guessed from either Entity definition, or one its field instances.
Type | Description |
---|---|
System.String |
Tags
Array of tags defined in this Entity definition
Type | Description |
---|---|
System.String[] |
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 |
UnityGrid
Type | Description |
---|---|
UnityEngine.Vector2Int | Grid-based coordinates |
UnityPivot
Type | Description |
---|---|
UnityEngine.Vector2 | Pivot coordinates of the Entity. (values are from 0 to 1) |
UnityPx
Type | Description |
---|---|
UnityEngine.Vector2Int | Pixel coordinates in current level coordinate space. Don't forget optional layer offsets, if they exist! |
UnityScale
Type | Description |
---|---|
UnityEngine.Vector3 | Entity scale multiplier, suitable for a transform's scale. |
UnitySize
Type | Description |
---|---|
UnityEngine.Vector2Int | Entity size in pixels, adjusted for this instance's resizing. |
UnitySmartColor
Type | Description |
---|---|
UnityEngine.Color | The entity "smart" color, guessed from either Entity definition, or one its field instances. |
UnityWorld
Type | Description |
---|---|
UnityEngine.Vector2Int | World coordinate in pixels. Only available in GridVania or Free world layouts. |
Width
Entity width in pixels. For non-resizable entities, it will be the same as Entity definition.
Type | Description |
---|---|
System.Int32 |
WorldX
X world coordinate in pixels. Only available in GridVania or Free world layouts.
Type | Description |
---|---|
System.Nullable<System.Int32> |
WorldY
Y world coordinate in pixels Only available in GridVania or Free world layouts.
Type | Description |
---|---|
System.Nullable<System.Int32> |