Struct GhostCollectionPrefabSerializer
A list of all serializer data for the prefabs in GhostCollectionPrefab. This list can be shorter if not all serializers are created yet. Added to the GhostCollection singleton entity.
Implements
Inherited Members
Namespace: Unity.NetCode
Assembly: Unity.NetCode.dll
Syntax
[InternalBufferCapacity(0)]
public struct GhostCollectionPrefabSerializer : IBufferElementData
Fields
BaseImportance
Higher importance means the ghost will be sent more frequently if there is not enough bandwidth to send everything. Minimum value: 1.
Declaration
public int BaseImportance
Field Value
Type | Description |
---|---|
int |
ChangeMaskBits
The number of bits used by change mask bitarray for this entire ghost type.
Declaration
public int ChangeMaskBits
Field Value
Type | Description |
---|---|
int |
CustomPreSerializer
The function pointer to invoke for pre-serializing the chunk (only for server).
Declaration
public PortableFunctionPointer<GhostPrefabCustomSerializer.ChunkPreserializeDelegate> CustomPreSerializer
Field Value
Type | Description |
---|---|
Portable |
CustomSerializer
A custom serializer function to serializer the chunk (only for server).
Declaration
public PortableFunctionPointer<GhostPrefabCustomSerializer.ChunkSerializerDelegate> CustomSerializer
Field Value
Type | Description |
---|---|
Portable |
EnableableBits
The number of bits necessary to store the enabled state of all the enableable ghost components (that are flagged with Ghost
Declaration
public int EnableableBits
Field Value
Type | Description |
---|---|
int |
FallbackPredictionMode
Used by the Ghost
Declaration
public GhostSpawnBuffer.Type FallbackPredictionMode
Field Value
Type | Description |
---|---|
Ghost |
FirstComponent
The index of the first component serialization rule to use inside the Ghost
Declaration
public int FirstComponent
Field Value
Type | Description |
---|---|
int |
IsGhostGroup
Flag that indicates if the ghost prefab contains a Ghost
Declaration
public int IsGhostGroup
Field Value
Type | Description |
---|---|
int |
See Also
MaxBufferSnapshotSize
The size of the largest replicated IBuffer
Declaration
public int MaxBufferSnapshotSize
Field Value
Type | Description |
---|---|
int |
MaxSendRateAsSimTickInterval
Max
Declaration
public byte MaxSendRateAsSimTickInterval
Field Value
Type | Description |
---|---|
byte |
See Also
NumBuffers
The total number of replicated IBuffer
Declaration
public int NumBuffers
Field Value
Type | Description |
---|---|
int |
NumChildComponents
The total number of serialized components present only in the child entities.
Declaration
public int NumChildComponents
Field Value
Type | Description |
---|---|
int |
NumComponents
The total number of serialized components. Include both root and child entities.
Declaration
public int NumComponents
Field Value
Type | Description |
---|---|
int |
OwnerPredicted
Flag stating if the ghost replication mode is set to owner predicted.
Declaration
public int OwnerPredicted
Field Value
Type | Description |
---|---|
int |
PartialComponents
Set to 1 when the ghost contains components with different Ghost
Declaration
public byte PartialComponents
Field Value
Type | Description |
---|---|
byte |
PartialSendToOwner
Set to 1 if the ghost has some components for which the Owner
Declaration
public byte PartialSendToOwner
Field Value
Type | Description |
---|---|
byte |
PredictedSpawnedGhostRollbackToSpawnTick
Enable predicted spawned ghost to rollback their initial spawn state and re-predict until the authoritative spawn has been received from the server.
Declaration
public byte PredictedSpawnedGhostRollbackToSpawnTick
Field Value
Type | Description |
---|---|
byte |
PredictionOwnerOffset
Only set if the Ghost
var ghostOwner = *(uint*)(snapshotDataPtr + PredictionOwnerOffset)
Declaration
public int PredictionOwnerOffset
Field Value
Type | Description |
---|---|
int |
RollbackPredictionOnStructuralChanges
Client CPU optimization. Force predicted ghost to always try to continue from the last prediction in case of structural changes. True by default (because may introduce some issue when replicated component are removed).
Declaration
public byte RollbackPredictionOnStructuralChanges
Field Value
Type | Description |
---|---|
byte |
SnapshotSize
The total size in bytes of the entire ghost type, including space for enable bits and change masks.
Declaration
public int SnapshotSize
Field Value
Type | Description |
---|---|
int |
StaticOptimization
True if the Ghost
Declaration
public byte StaticOptimization
Field Value
Type | Description |
---|---|
byte |
TypeHash
The stable type hash of the prefab. Used to retrieve GhostCollectionPrefabSerializer instance. The hash is composed by the name and the hash of all the component serializers.
Declaration
public ulong TypeHash
Field Value
Type | Description |
---|---|
ulong |
profilerMarker
A profile marker used to track serialization performance.
Declaration
public ProfilerMarker profilerMarker
Field Value
Type | Description |
---|---|
Profiler |