Struct ldtk::Definitions [−][src]
pub struct Definitions { pub layers: Vec<LayerDef>, pub enums: Vec<EnumDef>, pub entities: Vec<EntityDef>, pub external_enums: Vec<EnumDef>, pub tilesets: Vec<TilesetDef>, pub level_fields: Vec<FieldDef>, }
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.
Fields
layers: Vec<LayerDef>
All layer definitions
enums: Vec<EnumDef>
All internal enums
entities: Vec<EntityDef>
All entities definitions, including their custom fields
external_enums: Vec<EnumDef>
Note: external enums are exactly the same as enums
, except they have a relPath
to point to an external source file.
tilesets: Vec<TilesetDef>
All tilesets
level_fields: Vec<FieldDef>
All custom fields available to all levels.
Trait Implementations
impl Clone for Definitions
[src]
impl Clone for Definitions
[src]fn clone(&self) -> Definitions
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'de> Deserialize<'de> for Definitions
[src]
impl<'de> Deserialize<'de> for Definitions
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for Definitions
[src]
impl Serialize for Definitions
[src]Auto Trait Implementations
impl RefUnwindSafe for Definitions
impl RefUnwindSafe for Definitions
impl Send for Definitions
impl Send for Definitions
impl Sync for Definitions
impl Sync for Definitions
impl Unpin for Definitions
impl Unpin for Definitions
impl UnwindSafe for Definitions
impl UnwindSafe for Definitions
Blanket Implementations
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]