Class LayerInstance
Properties
|
Improve this Doc
View Source
AutoLayerTiles
An array containing all tiles generated by Auto-layer rules. The array is already sorted
in display order (ie. 1st tile is beneath 2nd, which is beneath 3rd etc.).
Note: if multiple tiles are stacked in the same cell as the result of different rules,
all tiles behind opaque ones will be discarded.
|
Improve this Doc
View Source
CHei
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
CWid
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
Definition
|
Improve this Doc
View Source
EntityInstances
|
Improve this Doc
View Source
GridSize
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
GridTiles
|
Improve this Doc
View Source
Identifier
Layer definition identifier
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Iid
Unique layer instance identifier
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
IntGrid
WARNING: this deprecated value is no longer exported since version 1.0.0 Replaced
by: intGridCsv
Type |
Description |
LDtkUnity.IntGridValueInstance[] |
|
|
Improve this Doc
View Source
IntGridCsv
A list of all values in the IntGrid layer, stored in CSV format (Comma Separated
Values).
Order is from left to right, and top to bottom (ie. first row from left to
right, followed by second row, etc).
0
means "empty cell" and IntGrid values
start at 1.
The array size is __cWid
x __cHei
cells.
Type |
Description |
System.Int32[] |
|
|
Improve this Doc
View Source
IntGridValueCount
Type |
Description |
System.Int32 |
Total count of IntGrid values that are not empty spaces.
|
|
Improve this Doc
View Source
IsAutoLayer
Type |
Description |
System.Boolean |
Returns true if this layer contains AutoLayer tiles.
|
|
Improve this Doc
View Source
IsDeadWeight
Type |
Description |
System.Boolean |
Returns true if this particular layer instance has no populated data.
|
|
Improve this Doc
View Source
IsEntitiesLayer
Type |
Description |
System.Boolean |
Returns true if this layer contains Entities.
|
|
Improve this Doc
View Source
IsIntGridLayer
Type |
Description |
System.Boolean |
Returns true if this layer contains IntGrid values.
|
|
Improve this Doc
View Source
IsTilesLayer
Type |
Description |
System.Boolean |
Returns true if this layer contains Grid tiles.
|
|
Improve this Doc
View Source
LayerDefUid
Reference the Layer definition UID
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
LevelId
Reference to the UID of the level containing this layer instance
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
LevelReference
|
Improve this Doc
View Source
Opacity
Layer opacity as Float [0-1]
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
OptionalRules
An Array containing the UIDs of optional rules that were enabled in this specific layer
instance.
Type |
Description |
System.Int32[] |
|
|
Improve this Doc
View Source
OverrideTilesetDefinition
|
Improve this Doc
View Source
OverrideTilesetUid
This layer can use another tileset by overriding the tileset UID here.
Type |
Description |
System.Nullable<System.Int32> |
|
|
Improve this Doc
View Source
PxOffsetX
X offset in pixels to render this layer, usually 0 (IMPORTANT: this should be added to
the LayerDef
optional offset, so you should probably prefer using __pxTotalOffsetX
which contains the total offset value)
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
PxOffsetY
Y offset in pixels to render this layer, usually 0 (IMPORTANT: this should be added to
the LayerDef
optional offset, so you should probably prefer using __pxTotalOffsetX
which contains the total offset value)
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
PxTotalOffsetX
Total layer X pixel offset, including both instance and definition offsets.
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
PxTotalOffsetY
Total layer Y pixel offset, including both instance and definition offsets.
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
Seed
Random seed used for Auto-Layers rendering
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
TilesetDefinition
|
Improve this Doc
View Source
TilesetDefUid
The definition UID of corresponding Tileset, if any.
Type |
Description |
System.Nullable<System.Int32> |
|
|
Improve this Doc
View Source
TilesetRelPath
The relative path to corresponding Tileset, if any.
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Type
Layer type (possible values: IntGrid, Entities, Tiles or AutoLayer)
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
UnityCellSize
Type |
Description |
UnityEngine.Vector2Int |
Grid-based size
|
|
Improve this Doc
View Source
UnityPxOffset
Type |
Description |
UnityEngine.Vector2Int |
Offset in pixels to render this layer, usually 0,0
|
|
Improve this Doc
View Source
UnityPxTotalOffset
Type |
Description |
UnityEngine.Vector2Int |
Total layer pixel offset, including both instance and definition offsets.
|
|
Improve this Doc
View Source
UnityWorldOffset
Type |
Description |
UnityEngine.Vector2 |
Offset in world space to render this layer, usually 0,0
|
|
Improve this Doc
View Source
UnityWorldTotalOffset
Type |
Description |
UnityEngine.Vector2 |
Total layer world-space offset, including both instance and definition offsets.
|
|
Improve this Doc
View Source
Visible
Layer instance visibility
Type |
Description |
System.Boolean |
|