SerializableFormatter<T> class

Namespace: Sirenix.Serialization
Assembly: Sirenix.Serialization
public sealed class SerializableFormatter<T> : BaseFormatter<T>, IFormatter<T>, IFormatter where T : ISerializable
Formatter for all types that implement the ISerializable interface.
See Also

Type Parameters


The type which can be serialized and deserialized by the formatter.


public SerializableFormatter()


DeserializeImplementation(ref T, IDataReader)
Provides the actual implementation for deserializing a value of type .
protected override void DeserializeImplementation(ref T value, IDataReader reader)
T value

The uninitialized value to serialize into. This value will have been created earlier using GetUninitializedObject().

Sirenix.Serialization.IDataReader reader

The reader to deserialize with.

Get an uninitialized object of type . WARNING: If you override this and return null, the object's ID will not be automatically registered and its OnDeserializing callbacks will not be automatically called, before deserialization begins. You will have to call and immediately after creating the object yourself during deserialization.
protected override T GetUninitializedObject()

An uninitialized object of type .

SerializeImplementation(ref T, IDataWriter)
Provides the actual implementation for serializing a value of type .
protected override void SerializeImplementation(ref T value, IDataWriter writer)
T value

The value to serialize.

Sirenix.Serialization.IDataWriter writer

The writer to serialize with.

This website is brand new and built with the Odin 2.1 beta in mind. This means you might discover some features such as attribute expressions that are only available in the beta.

You can download the 2.1 beta from here and read the patch-notes here.