Version 2.1.0.0

CoroutineFormatter class

Namespace: Sirenix.Serialization
Assembly: Sirenix.Serialization
public sealed class CoroutineFormatter : IFormatter<Coroutine>, IFormatter

Custom formatter for the UnityEngine.Coroutine type. This serializes nothing and always deserializes null, and only exists to ensure that no coroutine instances are ever created by the serialization system, since they will in almost all cases be invalid instances.

Invalid coroutine instances crash Unity instantly when they are garbage collected.

Inheritance
  • System.Object
  • CoroutineFormatter

Constructors

CoroutineFormatter()
public CoroutineFormatter()

Properties

SerializedType
Gets the type that the formatter can serialize.
public Type SerializedType { get; }

Methods

Deserialize(IDataReader)
Returns null.
public Coroutine Deserialize(IDataReader reader)
Parameters
Sirenix.Serialization.IDataReader reader

Returns
UnityEngine.Coroutine

Serialize(Object, IDataWriter)
Does nothing.
public void Serialize(object value, IDataWriter writer)
Parameters
System.Object value

Sirenix.Serialization.IDataWriter writer

Serialize(Coroutine, IDataWriter)
Does nothing.
public void Serialize(Coroutine value, IDataWriter writer)
Parameters
UnityEngine.Coroutine value

Sirenix.Serialization.IDataWriter writer

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.