csharp
public sealed class ContentReferenceSerializer<T> where T : classReads and writes a content reference: the id goes to the stream, the value does not.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Hand-written and generic, and registered per closed type by the [DataContract] generator when it sees a member of that type. That is what keeps it AOT-correct: every ContentReference<Texture> a build can encounter was instantiated in generated source rather than reflected into existence at run time.
Methods (2)
public override void Serialize(ref SerializationWriter writer, in ContentReference<T> value)Writes a value.
public override void Deserialize(ref SerializationReader reader, ref ContentReference<T> value)Reads a value into .
Used by (1)
- SerializerRegistrationVixen.Assets.Tests