Namespace: | Sirenix.Serialization |
Assembly: | Sirenix.Serialization |
public abstract class Serializer<T> : Serializer
Whenever serializing or deserializing anything, it is *strongly recommended* to use Get<T>() to get a proper wrapping serializer for that type.
NOTE: This class should NOT be inherited from; it is hard-coded into the system.
To extend the serialization system, instead create custom formatters, which are used by the ComplexTypeSerializer<T> class.
The type which the Serializer<T> can serialize and deserialize.
protected Serializer()
[Conditional("UNITY_EDITOR")]
protected static void FireOnSerializedType()
public abstract T ReadValue(IDataReader reader)
Sirenix.Serialization.IDataReader | reader | The reader to use. |
T | The value which has been read. |
public override object ReadValueWeak(IDataReader reader)
Sirenix.Serialization.IDataReader | reader | The reader to use. |
System.Object | The value which has been read. |
public void WriteValue(T value, IDataWriter writer)
T | value | The value to write. |
Sirenix.Serialization.IDataWriter | writer | The writer to use. |
public abstract void WriteValue(string name, T value, IDataWriter writer)
System.String | name | The name of the value to write. |
T | value | The value to write. |
Sirenix.Serialization.IDataWriter | writer | The writer to use. |
public override void WriteValueWeak(string name, object value, IDataWriter writer)
System.String | name | The name of the value to write. |
System.Object | value | The value to write. |
Sirenix.Serialization.IDataWriter | writer | The writer to use. |