Version 3.3.1.2

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