public static class SyncCodecsThe types a SyncVar`1 may hold.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
A closed set, resolved by a dictionary rather than by reflection. iOS is NativeAOT and trimming removes what it cannot see, so a codec discovered by walking a type at run time is a codec that is not there in the product. The set is the same one Vixen.Net.Generators understands for [Replicated] fields, and there is no version of this where it is right for the two to disagree.
A game with a type of its own registers a codec for it before constructing the first SyncVar that holds one — at start-up, beside the replication registry, where the rest of the closed sets are declared.
Methods (2)
public static void Register<T>(ISyncCodec<T> codec)Adds a codec for a type the engine does not know.
public static ISyncCodec<T> For<T>()Finds the codec for a type.
Used by (2)
- SyncListVixen.Net.Engine
- SyncVarVixen.Net.Engine