Version 2.1.0.0

EnumSerializer<T> class

Namespace: Sirenix.Serialization
Assembly: Sirenix.Serialization
public sealed class EnumSerializer<T> : Serializer<T>
Serializer for all enums.
Inheritance
See Also

Type Parameters

T

The type of the enum to serialize and deserialize.

Constructors

EnumSerializer()
public EnumSerializer()

Methods

ReadValue(IDataReader)
Reads an enum value of type .
public override T ReadValue(IDataReader reader)
Parameters
Sirenix.Serialization.IDataReader reader

The reader to use.

Returns
T

The value which has been read.

WriteValue(String, T, IDataWriter)
Writes an enum value of type .
public override void WriteValue(string name, T value, IDataWriter writer)
Parameters
System.String name

The name of the value to write.

T value

The value to write.

Sirenix.Serialization.IDataWriter writer

The writer to use.

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.