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.
public CoroutineFormatter()
public Type SerializedType { get; }
public Coroutine Deserialize(IDataReader reader)
Sirenix.Serialization.IDataReader | reader |
UnityEngine.Coroutine |
public void Serialize(object value, IDataWriter writer)
System.Object | value | |
Sirenix.Serialization.IDataWriter | writer |
public void Serialize(Coroutine value, IDataWriter writer)
UnityEngine.Coroutine | value | |
Sirenix.Serialization.IDataWriter | writer |