LDtk files contain 3 types of unique identifiers:
String identifiers
These are the ones displayed in the editor, editable by the user. They follow some constraints:
- only letters, numbers and underscores,
- no space, nor any special character,
- they are Capitalized by default, but you can change this behavior from the Project Settings panel.
String IIDs (aka “instance identifiers”)
This new identifier format was introduced in update 1.0.0. It is based on the official GUID.
The idea is to have a unique identifier for LDtk objects, even for projects created by 2 separate users on 2 distinct machines. The system pretty much guarantees that all your IIDs will be unique.
This uniqueness feature will be very useful in multi-users environments, for example when sharing a single LDtk project among multiple users through GIT.
Integer UIDs
Each definition has a uid
field which stands for Uniquer Identifier.
Each instance of whatever (entities, layers etc.) also has a defUid
field which simply refers to the corresponding definition with the same uid
.
IMPORTANT: future deprecation of integer UIDs
The long term plan is to completely get rid at some point of the current integer based UID system, to replace it with the much more robust string-based UUID system used by instance identifiers.
Therefore, you should rely on IIDs as much as possible in your game context.