Class GenerateSerializationForTypeAttribute
Specifies a specific type that needs serialization to be generated by codegen.
This is only needed in special circumstances where manual serialization is being done.
If you are making a generic network variable-style class, use GenerateSerializationForGenericParameterAttribute.
This attribute can be attached to any class or method anywhere in the codebase and
will trigger codegen to generate serialization code for the provided type. It only needs
to be included once type per codebase, but including it multiple times for the same type
is safe.
Implements
Inherited Members
Namespace: Unity.Netcode
Assembly: solution.dll
Syntax
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Method, AllowMultiple = true)]
public class GenerateSerializationForTypeAttribute : Attribute, _Attribute
Constructors
GenerateSerializationForTypeAttribute(Type)
Declaration
public GenerateSerializationForTypeAttribute(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type |