add unreliableBaselineRate

This commit is contained in:
mischa 2024-10-15 14:48:36 +02:00
parent c3f15251af
commit 1499640d5d

View File

@ -59,6 +59,12 @@ public class NetworkTransformHybrid2022 : NetworkBehaviour
public float sendInterval => 1f / sendRate;
// END CUSTOM CHANGE
/// <summary> </summary>
[Tooltip("Ocassionally send a full reliable state to delta compress against. This only applies to Components with SyncMethod=Unreliable.")]
public int unreliableBaselineRate = 1;
public float unreliableBaselineInterval => unreliableBaselineRate < int.MaxValue ? 1f / unreliableBaselineRate : 0; // for 1 Hz, that's 1000ms
double lastUnreliableBaselineTime;
// only sync when changed hack /////////////////////////////////////////
#if onlySyncOnChange_BANDWIDTH_SAVING
[Header("Sync Only If Changed")]