Show / Hide Table of Contents

Class TilesetDefinition

The Tileset definition is the most important part among project definitions. It contains some extra informations about each integrated tileset. If you only had to parse one definition section, that would be the one.

Properties

| Improve this Doc View Source

CachedPixelData

The following data is used internally for various optimizations. It's always synced with source image changes.

Type Description
System.Collections.Generic.Dictionary<System.String, System.Object>
| Improve this Doc View Source

CHei

Grid-based height

Type Description
System.Int32
| Improve this Doc View Source

CustomData

An array of custom tile metadata

Type Description
LDtkUnity.TileCustomMetadata[]
| Improve this Doc View Source

CWid

Grid-based width

Type Description
System.Int32
| Improve this Doc View Source

EmbedAtlas

If this value is set, then it means that this atlas uses an internal LDtk atlas image instead of a loaded one. Possible values: <null>, LdtkIcons

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

EnumTags

Tileset tags using Enum values specified by tagsSourceEnumId. This array contains 1 element per Enum value, which contains an array of all Tile IDs that are tagged with it.

Type Description
LDtkUnity.EnumTagValue[]
| Improve this Doc View Source

Identifier

User defined unique identifier

Type Description
System.String
| Improve this Doc View Source

IsEmbedAtlas

Type Description
System.Boolean

If this value is true, then it means that this definition uses an internal LDtk atlas image instead of a loaded one.

| Improve this Doc View Source

Padding

Distance in pixels from image borders

Type Description
System.Int32
| Improve this Doc View Source

PxHei

Image height in pixels

Type Description
System.Int32
| Improve this Doc View Source

PxWid

Image width in pixels

Type Description
System.Int32
| Improve this Doc View Source

RelPath

Path to the source file, relative to the current project JSON file
It can be null if no image was provided, or when using an embed atlas.

Type Description
System.String
| Improve this Doc View Source

SavedSelections

Array of group of tiles selections, only meant to be used in the editor

Type Description
System.Collections.Generic.Dictionary<System.String, System.Object>[]
| Improve this Doc View Source

Spacing

Space in pixels between all tiles

Type Description
System.Int32
| Improve this Doc View Source

Tags

An array of user-defined tags to organize the Tilesets

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

TagsSourceEnum

Type Description
EnumDefinition

Enum definition used for this tileset meta-data.
Make sure to call LDtkUidBank.CacheUidData(LdtkJson) first!

| Improve this Doc View Source

TagsSourceEnumUid

Optional Enum definition UID used for this tileset meta-data

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

TileGridSize

Type Description
System.Int32
| Improve this Doc View Source

Uid

Unique Intidentifier

Type Description
System.Int32
| Improve this Doc View Source

UnityCSize

Type Description
UnityEngine.Vector2Int

Grid based size

| Improve this Doc View Source

UnityPxSize

Type Description
UnityEngine.Vector2Int

Image size in pixels

Methods

| Improve this Doc View Source

FromJson(String)

Used for deserializing ".ldtkt" files.

Parameters
Type Name Description
System.String json

The LDtk json string to deserialize.

Returns
Type Description
TilesetDefinition

The deserialized tileset definition.

| Improve this Doc View Source

ToJson()

Returns
Type Description
System.Byte[]
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX