Struct GhostUpdateSystem
System present only in client worlds, and responsible for:
- updating the state of interpolated ghosts, by copying and intepolating data from the received snapshosts.
- restore the predicted ghost state from the GhostPredictionHistoryState before running the next prediction loop (until new snapshot aren't received).
- updating the PredictedGhost properties for all predicted ghost, by reflecting the latest received snapshot (see AppliedTick) and setting up the correct tick from which the ghost should start predicting (see PredictionStartTick
Implements
ISystem
ISystemCompilerGenerated
Inherited Members
Namespace: Unity.NetCode
Assembly: Unity.NetCode.dll
Syntax
[UpdateInGroup(typeof(GhostSimulationSystemGroup))]
[UpdateAfter(typeof(GhostReceiveSystem))]
[UpdateBefore(typeof(GhostSpawnClassificationSystemGroup))]
[UpdateBefore(typeof(GhostInputSystemGroup))]
[WorldSystemFilter(WorldSystemFilterFlags.ClientSimulation, WorldSystemFilterFlags.Default)]
[BurstCompile]
public struct GhostUpdateSystem : ISystem, ISystemCompilerGenerated
Methods
OnCreate(ref SystemState)
Declaration
public void OnCreate(ref SystemState systemState)
Parameters
Type | Name | Description |
---|---|---|
SystemState | systemState |
OnCreateForCompiler(ref SystemState)
Declaration
public void OnCreateForCompiler(ref SystemState state)
Parameters
Type | Name | Description |
---|---|---|
SystemState | state |
OnDestroy(ref SystemState)
Declaration
public void OnDestroy(ref SystemState systemState)
Parameters
Type | Name | Description |
---|---|---|
SystemState | systemState |
OnUpdate(ref SystemState)
Declaration
[BurstCompile]
public void OnUpdate(ref SystemState systemState)
Parameters
Type | Name | Description |
---|---|---|
SystemState | systemState |
Implements
Unity.Entities.ISystem
Unity.Entities.ISystemCompilerGenerated