manganese_serialization_kit v0.2.4 Manganese.SerializationKit.Structs.UnityComponent

A generic Unity component.

There are other modules for specific component types. When de/serializing with the generic Manganese.SerializationKit.Structs.UnityComponent module, the :type property will be inspected and the appropriate de/serializer will be used. If the component type is not known, it will use this module as a struct.

The known component types are:

Deserialization

Serialization

Link to this section Summary

Types

The internal ID used by Unity to uniquely identify components.

t()

A Unity component of an unknown type.

Functions

Deserialize a component from a map.

Serialize a component to a map.

Link to this section Types

The internal ID used by Unity to uniquely identify components.

Link to this type

t()
t() :: %Manganese.SerializationKit.Structs.UnityComponent{
  id: id(),
  type: Manganese.SerializationKit.Enumerations.UnityComponentType.t()
}

A Unity component 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()) :: term()

Deserialize a component from a map.

Note this deserialization method may return a struct of a component type-specific module.

Link to this function

to_map(unity_component)
to_map(term()) :: t_external()

Serialize a component to a map.

If a component struct of a component type-specific class is given, the appropriate serializer will be used.