Class GhostPredictionHistorySystem
A system used to make a backup o the current predicted state right after the last full (not fractional) tick in a prediction loop for a frame has been completed. The backup does a memcopy of all components which are rolled back as part of prediction to a separate memory area connected to the chunk. The backup is used to restore the last full tick to continue prediction when no new data has arrived, when that happens only the fields which are actually serialized as part of the snapshot are copied back, not the full component. The backup data is also used to detect errors in the prediction as well as to add smoothing of predicted values.
Inherited Members
Namespace: Unity.NetCode
Syntax
[UpdateInWorld(TargetWorld.Client)]
[UpdateInGroup(typeof(GhostPredictionSystemGroup), OrderLast = true)]
public class GhostPredictionHistorySystem : SystemBase
Fields
LastBackupTick
Declaration
public uint LastBackupTick
Field Value
Type | Description |
---|---|
UInt32 |
Methods
OnCreate()
Declaration
protected override void OnCreate()
Overrides
OnDestroy()
Declaration
protected override void OnDestroy()
Overrides
OnUpdate()
Declaration
protected override void OnUpdate()