Struct GhostDeltaPredictor
For internal use only. Used by the ghost component serializer to calculate (predict) the new value for a field, given the two previous baseline values.
This value provides a good estimate for current value of a variable when changes are linear or otherwise predictable. I.e. Small deltas have good compression ratios.
Inherited Members
Namespace: Unity.NetCode
Assembly: solution.dll
Syntax
public struct GhostDeltaPredictor
Constructors
Name | Description |
---|---|
GhostDeltaPredictor(NetworkTick, NetworkTick, NetworkTick, NetworkTick) | Construct the predictor using the last three recent baselines ticks. The ticks are used to calculate the relative weight that is applied to the baseline values. |
Methods
Name | Description |
---|---|
PredictInt(int, int, int) | Calculate the predicted value for the given integer, using the previous three baselines. |
PredictLong(long, long, long) | Calculate the predicted value for the given long, using the previous three baselines. |