Version 3.0.1.0

SerializationBackend class

Namespace: Sirenix.OdinInspector.Editor
Assembly: Sirenix.OdinInspector.Editor
public abstract class SerializationBackend
Class that describes the different possible serialization backends that a property can have, and specifies the capabilities of each backend.
Inheritance
  • System.Object
  • SerializationBackend

Constructors

SerializationBackend()
protected SerializationBackend()

Fields

None

The property is not serialized by anything - possibly because it is a method, possibly because it is a field or property shown in the inspector without being serialized.

In the case of fields or properties, polymorphism, null values and types such as System.Collections.Generic.Dictionary<TKey, TValue> are supported, but will not be saved.

public static readonly SerializationBackend None
Odin
The property is serialized by Odin. Polymorphism, null values and types such as System.Collections.Generic.Dictionary<TKey, TValue> are supported.
public static readonly SerializationBackend Odin
Unity
The property is serialized by Unity's classic serialization backend. Polymorphism, null values and types such as System.Collections.Generic.Dictionary<TKey, TValue> are not supported.
public static readonly SerializationBackend Unity
UnityPolymorphic
The property is serialized by Unity's polymorphic serialization backend via the [SerializeReference] attribute. Polymorphism, null values and cyclical references are supported.
public static readonly SerializationBackend UnityPolymorphic

Properties

IsUnity
public abstract bool IsUnity { get; }
SupportsCyclicReferences
public abstract bool SupportsCyclicReferences { get; }
SupportsGenerics
public abstract bool SupportsGenerics { get; }
SupportsPolymorphism
public abstract bool SupportsPolymorphism { get; }

Methods

CanSerializeMember(MemberInfo)
public abstract bool CanSerializeMember(MemberInfo member)
Parameters
System.Reflection.MemberInfo member

Returns
System.Boolean

CanSerializeType(Type)
public abstract bool CanSerializeType(Type type)
Parameters
System.Type type

Returns
System.Boolean