Class Serializer
Serializes/Deserializes realizations.
Namespace: Xareus.Relations.Unity
Assembly: Xareus.Relations.Unity.dll
Syntax
public class Serializer : MonoBehaviour
Fields
DeserializationRate
Maximum number of realization to deserialize each frame for each request. Only works if UseAutoSmoothRealizationCreation is disabled and a request with a callback has been made
Declaration
public int DeserializationRate
Field Value
Type | Description |
---|---|
int |
UseAutoSmoothDeserialization
Deserialize over multiple frame using our algorithm
Declaration
public bool UseAutoSmoothDeserialization
Field Value
Type | Description |
---|---|
bool |
UseSmoothDeserialization
Deserialization over multiple frames when using cluster (done before creating realizations)
Declaration
[Tooltip("Deserialization over multiple frames when using cluster (done before creating realizations)")]
public bool UseSmoothDeserialization
Field Value
Type | Description |
---|---|
bool |
instance
The only instance of Serializer
Declaration
public static Serializer instance
Field Value
Type | Description |
---|---|
Serializer |
Methods
DeserializeRealization(string)
Deserializes a serialized string into a realizations.
Declaration
public static Realization DeserializeRealization(string serializedString)
Parameters
Type | Name | Description |
---|---|---|
string | serializedString | The serialized string |
Returns
Type | Description |
---|---|
Realization | The realizations |
DeserializeRealizationList(string)
Deserializes a serialized string into a list of realizations.
Declaration
public List<Realization> DeserializeRealizationList(string serializedString)
Parameters
Type | Name | Description |
---|---|---|
string | serializedString | The serialized string |
Returns
Type | Description |
---|---|
List<Realization> | The list of realizations |
DeserializeRealizationList(string, Action<List<Realization>>)
Deserializes a serialized string into a list of realizations.
Declaration
public void DeserializeRealizationList(string serializedString, Action<List<Realization>> callback)
Parameters
Type | Name | Description |
---|---|---|
string | serializedString | The serialized string |
Action<List<Realization>> | callback |
DeserializeTransitions(string)
Deserializes a serialized string into a list of transitions.
Declaration
public static List<Transition> DeserializeTransitions(string serializedString)
Parameters
Type | Name | Description |
---|---|---|
string | serializedString | The serialized string |
Returns
Type | Description |
---|---|
List<Transition> | The list of realizations |
Serialize(IEnumerable<Realization>)
Serializes a list of realizations into a string.
Declaration
public static string Serialize(IEnumerable<Realization> realizationList)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Realization> | realizationList | The list of realizations |
Returns
Type | Description |
---|---|
string | The serialized string |
Serialize(List<Transition>)
Serializes a list of transitions into a string.
Declaration
public static string Serialize(List<Transition> transitionList)
Parameters
Type | Name | Description |
---|---|---|
List<Transition> | transitionList | The list of transitions |
Returns
Type | Description |
---|---|
string | The serialized string |
Serialize(Realization)
Serializes a realizations into a string.
Declaration
public static string Serialize(Realization realization)
Parameters
Type | Name | Description |
---|---|---|
Realization | realization | The realization |
Returns
Type | Description |
---|---|
string | The serialized string |