Struct ComponentTypeSerializationStrategy
For internal use only. Stores individual "serialization strategies" (and meta-data) for all netcode-informed components,
as well as all variants of these components (Ghost
Note: Serializers are considered "optional". It is perfectly valid for a types "serialization strategy" to be: "Do nothing".
An example of this is a component for which a variant has been declared (using the Ghost
Implements
Inherited Members
Namespace: Unity.NetCode
Assembly: solution.dll
Syntax
public struct ComponentTypeSerializationStrategy : IComparable<ComponentTypeSerializationStrategy>
Remarks
This type was renamed from "VariantType" for 1.0.
Fields
Name | Description |
---|---|
Component | Component that this Variant is associated with. |
Default |
|
Display |
The type name, unless it has a Variant (in which case it'll use the Variant Display name... assuming that is not null). |
Has |
Does this component explicitly opt-out of overrides (regardless of variant count)? |
Hash | Hash identifier for the strategy. Should be non-zero by the time it's used in Select |
Is |
True if this is the "default" serializer for this component type.
I.e. The one generated from the component definition itself (see Ghost |
Is |
True if the code-generator determined that this is an input buffer. |
Is |
True if the code-generator determined that this is an input component (or a variant of one). |
Is |
True if editor-only. Hides it in the user-facing dropdown. If true; we'll set this variant as the default in the editor, assuming we're unable to find a "proper" default. |
Prefab |
The Ghost |
Self |
Indexer into Serialization |
Send |
True if the Send |
Send |
Override which client type it will be sent to, if we're able to determine. |
Serializer |
Indexes into the Serializers. |
Properties
Name | Description |
---|---|
Is |
True if this variant is the Client |
Is |
True if this variant is the Dont |
Is |
True if this variant serializes its data. |
Methods
Name | Description |
---|---|
Compare |
Check if two VariantType are identical. |
To |
Logs a burst compatible debug string (if in burst), otherwise logs even more info. |