Class Definitions
If you're writing your own LDtk importer, you should probably just ignore most stuff in
the defs
section, as it contains data that are mostly important to the editor. To keep
you away from the defs
section and avoid some unnecessary JSON parsing, important data
from definitions is often duplicated in fields prefixed with a double underscore (eg.
__identifier
or __type
). The 2 only definition types you might need here are
Tilesets and Enums.
A structure containing all the definitions of this project
Properties
| Improve this Doc View SourceAutoLayers
Type | Description |
---|---|
LayerDefinition[] | All Auto-Layer definitions. (Empty if none are defined) |
Entities
All entities definitions, including their custom fields
Type | Description |
---|---|
EntityDefinition[] |
EntityLayers
Type | Description |
---|---|
LayerDefinition[] | All IntGrid layer definitions. (Empty if none are defined) |
Enums
All internal enums
Type | Description |
---|---|
EnumDefinition[] |
ExternalEnums
Note: external enums are exactly the same as enums
, except they have a relPath
to
point to an external source file.
Type | Description |
---|---|
EnumDefinition[] |
IntGridLayers
Type | Description |
---|---|
LayerDefinition[] | All IntGrid layer definitions. (Empty if none are defined) |
Layers
All layer definitions
Type | Description |
---|---|
LayerDefinition[] |
LevelFields
All custom fields available to all levels.
Type | Description |
---|---|
FieldDefinition[] |
Tilesets
All tilesets
Type | Description |
---|---|
TilesetDefinition[] |
TilesLayers
Type | Description |
---|---|
LayerDefinition[] | All Tile layer definitions. (Empty if none are defined) |