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:

Deserialization

Serialization

Link to this section Summary

Types

The internal ID used by Unity to uniquely identify assets.

t()

A Unity asset of an unknown type.

Functions

Deserialize an asset from a map.

Serialize an asset to a map.

Link to this section Types

The internal ID used by Unity to uniquely identify assets.

Link to this type

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() :: map()

Link to this section Functions

Link to this function

from_map(params)
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(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.