LDtkFieldDefinition

@Serializable
data class LDtkFieldDefinition(val type: String, val acceptFileTypes: List<String>? = null, val arrayMaxLength: Int? = null, val arrayMinLength: Int? = null, val canBeNull: Boolean, val defaultOverride: DefaultOverrideInfo? = null, val identifier: String, val isArray: Boolean, val max: Float? = null, val min: Float? = null, val regex: String? = null, val uid: Int)

This section is mostly only intended for the LDtk editor app itself. You can safely ignore it.

Constructors

Link copied to clipboard
fun LDtkFieldDefinition(type: String, acceptFileTypes: List<String>? = null, arrayMaxLength: Int? = null, arrayMinLength: Int? = null, canBeNull: Boolean, defaultOverride: DefaultOverrideInfo? = null, identifier: String, isArray: Boolean, max: Float? = null, min: Float? = null, regex: String? = null, uid: Int)

Properties

Link copied to clipboard

Optional list of accepted file extensions for FilePath value type. Includes the dot: .ext

Link copied to clipboard
val arrayMaxLength: Int? = null

Array max length

Link copied to clipboard
val arrayMinLength: Int? = null

Array min length

Link copied to clipboard

TRUE if the value can be null. For arrays, TRUE means it can contain null values (exception: array of Points can't have null values).

Link copied to clipboard

Default value if selected value is null or invalid.

Link copied to clipboard

Unique String identifier

Link copied to clipboard

TRUE if the value is an array of multiple values

Link copied to clipboard
val max: Float? = null

Max limit for value, if applicable

Link copied to clipboard
val min: Float? = null

Min limit for value, if applicable

Link copied to clipboard
val regex: String? = null

Optional regular expression that needs to be matched to accept values. Expected format: /some_reg_ex/g, with optional "i" flag.

Link copied to clipboard

Human readable value type (eg. Int, Float, Point, etc.). If the field is an array, this field will look like Array<...> (eg. Array<Int>, Array<Point> etc.)

Link copied to clipboard
val uid: Int

Unique Intidentifier