Data Types

Choosing the appropriate data type is essential for ensuring that game data is accurately structured, efficiently stored, and correctly interpreted by both the editor and runtime systems. Each data type serves a specific purpose and is designed to represent particular kinds of values or relationships.

For instance, use the Text data type for simple string values, or the LocalizedText type when the same text must support multiple languages. For numeric data, Number is suited for decimal values, while Integer should be used for whole numbers.

When a property should be selected from a defined set of options, PickList and MultiPickList are recommended for single or multiple selections, respectively. For more complex structures, use Document to define an embedded object, or DocumentCollection to represent a list of such objects.

By selecting data types according to their intended purpose, developers can ensure better validation, clearer data organization, and more predictable behavior across tools and runtime systems.

Data Types

Data Type

Description

Example

Text

A line of text.

“Hello, world!”

LocalizedText

A localized text for multiple languages.

{“en-US”: “Hello”, “fr-FR”: “Bonjour”}

Logical

A true/false value.

true

Time

A time duration (days, hours, etc.).

“1.00:00:00”

Date

A calendar date and time.

“2017-12-27T00:00:00.000Z”

Number

A decimal number.

3.14

Integer

A whole number.

42

PickList

A single value from a predefined list.

“Red”

MultiPickList

Multiple values from a predefined list.

“Apple, Banana, Cherry”

Document

An embedded structured object.

{ “Id”: “Sword”, “Name”: “Rusty Sword” }

DocumentCollection

A list of embedded structured objects.

[{ “Id”: “Sword”, “Name”: “Rusty Sword” }]

Reference

A pointer to another document by ID.

{ “Id”: “Sword” }

ReferenceCollection

A list of pointers to other documents.

[{ “Id”: “Sword” }]

Formula

A C# expression evaluated at runtime.

“target.HP < 100”

Sub-Types

Sub-Type

Base Type

Description

Asset Path

Text

A relative path to a single game asset.

Vector 2/3/4

Text

A group of 2, 3, or 4 decimal values (e.g., position or scale).

Integer Vector 2/3/4

Text

A group of 2, 3, or 4 whole numbers.

Rectangle

Text

A rectangle with floating-point position and size.

Integer Rectangle

Text

A rectangle with integer position and size.

Tags

Text

A reusable set of tags shared across documents.

Use Cases and Guidance

  • Use Text and LocalizedText for titles, descriptions, and UI content.

  • Choose Integer or Number for quantities, rates, and stats.

  • Use Document or Reference to include structured data or link to another entity.

  • Use PickList or MultiPickList when the value should be selected from a known set.

  • Use Asset Path or Asset Path Collection when referencing assets like textures, sounds, or prefabs by path.

  • Use Formula to define runtime-calculated values, like damage formulas or dynamic prices.

  • Use Tags when multiple documents share common descriptors (e.g., “fire”, “enemy”, “magic”).