manganese_serialization_kit v0.2.4 Manganese.SerializationKit.Structs.UnityAsset
A generic Unity asset. Assets are usually associated with an asset bundle.
There are other modules for specific asset types. When de/serializing with the generic Manganese.SerializationKit.Structs.UnityAsset
module, the :type
property will be inspected and the appropriate de/serializer will be used. If the asset type is not known, it will use this module as a struct.
The known asset types are:
Manganese.SerializationKit.Structs.UnityTextAsset
Manganese.SerializationKit.Structs.UnityPrefabAsset
Manganese.SerializationKit.Structs.UnityMaterialAsset
Deserialization
- See
from_map/1
Serialization
- See
to_map/1
Link to this section Summary
Link to this section Types
Link to this type
id()
id()
id() :: pos_integer()
id() :: pos_integer()
The internal ID used by Unity to uniquely identify assets.
Link to this type
t()
t()
t() :: %Manganese.SerializationKit.Structs.UnityAsset{
id: id(),
name: String.t(),
path: String.t(),
type: Manganese.SerializationKit.Enumerations.UnityAssetType.t()
}
t() :: %Manganese.SerializationKit.Structs.UnityAsset{ id: id(), name: String.t(), path: String.t(), type: Manganese.SerializationKit.Enumerations.UnityAssetType.t() }
A Unity asset of an unknown type.
Link to this type
t_external()
t_external()
t_external() :: map()
t_external() :: map()
Link to this section Functions
Link to this function
from_map(params)
from_map(params)
from_map(t_external()) :: t()
from_map(t_external()) :: t()
Deserialize an asset from a map.
Note this deserialization method may return a struct of an asset type-specific module.
Link to this function
to_map(asset)
to_map(asset)
to_map(term()) :: t_external()
to_map(term()) :: t_external()
Serialize an asset to a map.
If a asset struct of an asset type-specific class is given, the appropriate serializer will be used.