Struct GhostImportance
Singleton component used to control importance settings
Implements
Inherited Members
Namespace: Unity.NetCode
Assembly: Unity.NetCode.dll
Syntax
[BurstCompile]
public struct GhostImportance : IComponentData, IQueryTypeParameter
Fields
BatchScaleImportanceFunction
This function pointer will be invoked with collected data as described in GhostImportance.BatchScaleImportanceDelegate.
It is mandatory to set either this or ScaleImportanceFunction function pointer. It is also valid to set both, in which case the BatchScaleImportanceFunction is preferred.
Declaration
public PortableFunctionPointer<GhostImportance.BatchScaleImportanceDelegate> BatchScaleImportanceFunction
Field Value
Type | Description |
---|---|
PortableFunctionPointer<GhostImportance.BatchScaleImportanceDelegate> |
GhostConnectionComponentType
ComponentType for connection data. GhostSendSystem will query for this component type before invoking the function assigned to BatchScaleImportanceFunction.
Declaration
public ComponentType GhostConnectionComponentType
Field Value
Type | Description |
---|---|
ComponentType |
GhostImportanceDataType
Optional singleton ComponentType for configuration data. Leave default if not required. Zero will be passed into the BatchScaleImportanceFunction. GhostSendSystem will query for this component type, passing the data into the BatchScaleImportanceFunction function when invoking it.
Declaration
public ComponentType GhostImportanceDataType
Field Value
Type | Description |
---|---|
ComponentType |
GhostImportancePerChunkDataType
ComponentType for per chunk data. Must be a shared component type! Each chunk represents a group of entities, collected as they share some importance-related value (e.g. distance to the players character controller). GhostSendSystem will query for this component type before invoking the function assigned to BatchScaleImportanceFunction.
Declaration
public ComponentType GhostImportancePerChunkDataType
Field Value
Type | Description |
---|---|
ComponentType |
NoScaleFunctionPointer
Default implementation of GhostImportance.ScaleImportanceDelegate. Will return basePriority without computation.
Declaration
public static readonly PortableFunctionPointer<GhostImportance.ScaleImportanceDelegate> NoScaleFunctionPointer
Field Value
Type | Description |
---|---|
PortableFunctionPointer<GhostImportance.ScaleImportanceDelegate> |
ScaleImportanceFunction
This function pointer will be invoked with collected data as described in GhostImportance.BatchScaleImportanceDelegate.
It is mandatory to set either this or BatchScaleImportanceFunction function pointer. It is also valid to set both, in which case the BatchScaleImportanceFunction is preferred.
Declaration
public PortableFunctionPointer<GhostImportance.ScaleImportanceDelegate> ScaleImportanceFunction
Field Value
Type | Description |
---|---|
PortableFunctionPointer<GhostImportance.ScaleImportanceDelegate> |