Version 3.3.0.1

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.
Inheritance
See Also

Type Parameters

T

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

Constructors

SerializableFormatter()
public SerializableFormatter()

Methods

DeserializeImplementation(ref T, IDataReader)
Provides the actual implementation for deserializing a value of type .
protected override void DeserializeImplementation(ref T value, IDataReader reader)
Parameters
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.

GetUninitializedObject()
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()
Returns
T

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)
Parameters
T value

The value to serialize.

Sirenix.Serialization.IDataWriter writer

The writer to serialize with.