Namespace: | Sirenix.Serialization |
Assembly: | Sirenix.Serialization |
public static class SerializationUtility
public static object CreateCopy(object obj)
System.Object | obj |
System.Object |
public static IDataReader CreateReader(Stream stream, DeserializationContext context, DataFormat format)
System.IO.Stream | stream | The stream to read from. |
DeserializationContext | context | The deserialization context to use. |
DataFormat | format | The format to read. |
Sirenix.Serialization.IDataReader | An Sirenix.Serialization.IDataReader for a given format. |
System.NotImplementedException |
public static IDataWriter CreateWriter(Stream stream, SerializationContext context, DataFormat format)
System.IO.Stream | stream | The stream to write to. |
SerializationContext | context | The serialization context to use. |
DataFormat | format | The format to write. |
Sirenix.Serialization.IDataWriter | An Sirenix.Serialization.IDataWriter for a given format. |
System.NotImplementedException |
public static T DeserializeValue<T>(IDataReader reader)
Sirenix.Serialization.IDataReader | reader | The reader to use. |
T | The deserialized value. |
T | The type to deserialize. |
public static T DeserializeValue<T>(IDataReader reader, List<Object> referencedUnityObjects)
Sirenix.Serialization.IDataReader | reader | The reader to use. |
System.Collections.Generic.List<UnityEngine.Object> | referencedUnityObjects | The list of Unity objects to use for external index reference resolution. |
T | The deserialized value. |
T | The type to deserialize. |
public static T DeserializeValue<T>(byte[] bytes, DataFormat format, DeserializationContext context = null)
System.Byte[] | bytes | The bytes to deserialize from. |
DataFormat | format | The format to read. |
DeserializationContext | context | The context to use. |
T | The deserialized value. |
T | The type to deserialize. |
public static T DeserializeValue<T>(byte[] bytes, DataFormat format, List<Object> referencedUnityObjects, DeserializationContext context = null)
System.Byte[] | bytes | The bytes to deserialize from. |
DataFormat | format | The format to read. |
System.Collections.Generic.List<UnityEngine.Object> | referencedUnityObjects | The list of Unity objects to use for external index reference resolution. |
DeserializationContext | context | The context to use. |
T | The deserialized value. |
T | The type to deserialize. |
public static T DeserializeValue<T>(Stream stream, DataFormat format, DeserializationContext context = null)
System.IO.Stream | stream | The stream to read from. |
DataFormat | format | The format to read. |
DeserializationContext | context | The context. |
T | The deserialized value. |
T | The type to deserialize. |
public static T DeserializeValue<T>(Stream stream, DataFormat format, List<Object> referencedUnityObjects, DeserializationContext context = null)
System.IO.Stream | stream | The stream to read from. |
DataFormat | format | The format to read. |
System.Collections.Generic.List<UnityEngine.Object> | referencedUnityObjects | The list of Unity objects to use for external index reference resolution. |
DeserializationContext | context | The context. |
T | The deserialized value. |
T | The type to deserialize. |
public static object DeserializeValueWeak(IDataReader reader)
Sirenix.Serialization.IDataReader | reader | The reader to use. |
System.Object | The deserialized value. |
public static object DeserializeValueWeak(IDataReader reader, List<Object> referencedUnityObjects)
Sirenix.Serialization.IDataReader | reader | The reader to use. |
System.Collections.Generic.List<UnityEngine.Object> | referencedUnityObjects | The list of Unity objects to use for external index reference resolution. |
System.Object | The deserialized value. |
public static object DeserializeValueWeak(byte[] bytes, DataFormat format, DeserializationContext context = null)
System.Byte[] | bytes | The bytes to deserialize from. |
DataFormat | format | The format to read. |
DeserializationContext | context | The context. |
System.Object | The deserialized value. |
public static object DeserializeValueWeak(byte[] bytes, DataFormat format, List<Object> referencedUnityObjects)
System.Byte[] | bytes | The bytes to deserialize from. |
DataFormat | format | The format to read. |
System.Collections.Generic.List<UnityEngine.Object> | referencedUnityObjects | The list of Unity objects to use for external index reference resolution. |
System.Object | The deserialized value. |
public static object DeserializeValueWeak(Stream stream, DataFormat format, DeserializationContext context = null)
System.IO.Stream | stream | The reader to use. |
DataFormat | format | The format to read. |
DeserializationContext | context | The context. |
System.Object | The deserialized value. |
public static object DeserializeValueWeak(Stream stream, DataFormat format, List<Object> referencedUnityObjects, DeserializationContext context = null)
System.IO.Stream | stream | The stream to read from. |
DataFormat | format | The format to read. |
System.Collections.Generic.List<UnityEngine.Object> | referencedUnityObjects | The list of Unity objects to use for external index reference resolution. |
DeserializationContext | context | The context. |
System.Object | The deserialized value. |
public static byte[] SerializeValue<T>(T value, DataFormat format, SerializationContext context = null)
T | value | The value to serialize. |
DataFormat | format | The format to use. |
SerializationContext | context | The context to use. |
System.Byte[] | A byte array containing the serialized value. |
T | The type of the value to serialize. |
public static byte[] SerializeValue<T>(T value, DataFormat format, out List<Object> unityObjects, SerializationContext context = null)
T | value | The value to serialize. |
DataFormat | format | The format to use. |
System.Collections.Generic.List<UnityEngine.Object> | unityObjects | A list of the Unity objects which were referenced during serialization. |
SerializationContext | context | The context to use. |
System.Byte[] | A byte array containing the serialized value. |
T | The type of the value to serialize. |
public static void SerializeValue<T>(T value, IDataWriter writer)
T | value | The value to serialize. |
Sirenix.Serialization.IDataWriter | writer | The writer to use. |
T | The type of the value to serialize. |
public static void SerializeValue<T>(T value, IDataWriter writer, out List<Object> unityObjects)
T | value | The value to serialize. |
Sirenix.Serialization.IDataWriter | writer | The writer to use. |
System.Collections.Generic.List<UnityEngine.Object> | unityObjects | A list of the Unity objects which were referenced during serialization. |
T | The type of the value to serialize. |
public static void SerializeValue<T>(T value, Stream stream, DataFormat format, SerializationContext context = null)
T | value | The value to serialize. |
System.IO.Stream | stream | The stream to serialize to. |
DataFormat | format | The format to serialize in. |
SerializationContext | context | The context. |
T | The type of the value to serialize. |
public static void SerializeValue<T>(T value, Stream stream, DataFormat format, out List<Object> unityObjects, SerializationContext context = null)
T | value | The value to serialize. |
System.IO.Stream | stream | The stream to serialize to. |
DataFormat | format | The format to serialize in. |
System.Collections.Generic.List<UnityEngine.Object> | unityObjects | A list of the Unity objects which were referenced during serialization. |
SerializationContext | context | The context. |
T | The type of the value to serialize. |
public static byte[] SerializeValueWeak(object value, DataFormat format, SerializationContext context = null)
System.Object | value | The value to serialize. |
DataFormat | format | The format to use. |
SerializationContext | context | The context. |
System.Byte[] | A byte array containing the serialized value. |
public static byte[] SerializeValueWeak(object value, DataFormat format, out List<Object> unityObjects)
System.Object | value | The value to serialize. |
DataFormat | format | The format to use. |
System.Collections.Generic.List<UnityEngine.Object> | unityObjects | A list of the Unity objects which were referenced during serialization. |
System.Byte[] | A byte array containing the serialized value. |
public static void SerializeValueWeak(object value, IDataWriter writer)
System.Object | value | The value to serialize. |
Sirenix.Serialization.IDataWriter | writer | The writer to use. |
public static void SerializeValueWeak(object value, IDataWriter writer, out List<Object> unityObjects)
System.Object | value | The value to serialize. |
Sirenix.Serialization.IDataWriter | writer | The writer to use. |
System.Collections.Generic.List<UnityEngine.Object> | unityObjects | A list of the Unity objects which were referenced during serialization. |
public static void SerializeValueWeak(object value, Stream stream, DataFormat format, SerializationContext context = null)
System.Object | value | The value to serialize. |
System.IO.Stream | stream | The stream to serialize to. |
DataFormat | format | The format to serialize in. |
SerializationContext | context | The context. |
public static void SerializeValueWeak(object value, Stream stream, DataFormat format, out List<Object> unityObjects, SerializationContext context = null)
System.Object | value | The value to serialize. |
System.IO.Stream | stream | The stream to serialize to. |
DataFormat | format | The format to serialize in. |
System.Collections.Generic.List<UnityEngine.Object> | unityObjects | A list of the Unity objects which were referenced during serialization. |
SerializationContext | context | The context. |