Skip to content

Commit 9ffb544

Browse files
authored
feat: Remove lag compensation related stuff from config (#622)
1 parent 2fb5e8c commit 9ffb544

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

com.unity.multiplayer.mlapi/Editor/NetworkManagerEditor.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ public class NetworkManagerEditor : Editor
3030
private SerializedProperty m_MaxObjectUpdatesPerTickProperty;
3131
private SerializedProperty m_ClientConnectionBufferTimeoutProperty;
3232
private SerializedProperty m_ConnectionApprovalProperty;
33-
private SerializedProperty m_SecondsHistoryProperty;
3433
private SerializedProperty m_EnableTimeResyncProperty;
3534
private SerializedProperty m_TimeResyncIntervalProperty;
3635
private SerializedProperty m_EnableNetworkVariableProperty;
@@ -106,7 +105,6 @@ private void Init()
106105
m_EventTickrateProperty = m_NetworkConfigProperty.FindPropertyRelative("EventTickrate");
107106
m_ClientConnectionBufferTimeoutProperty = m_NetworkConfigProperty.FindPropertyRelative("ClientConnectionBufferTimeout");
108107
m_ConnectionApprovalProperty = m_NetworkConfigProperty.FindPropertyRelative("ConnectionApproval");
109-
m_SecondsHistoryProperty = m_NetworkConfigProperty.FindPropertyRelative("SecondsHistory");
110108
m_EnableTimeResyncProperty = m_NetworkConfigProperty.FindPropertyRelative("EnableTimeResync");
111109
m_TimeResyncIntervalProperty = m_NetworkConfigProperty.FindPropertyRelative("TimeResyncInterval");
112110
m_EnableNetworkVariableProperty = m_NetworkConfigProperty.FindPropertyRelative("EnableNetworkVariable");
@@ -144,7 +142,6 @@ private void CheckNullProperties()
144142
m_EventTickrateProperty = m_NetworkConfigProperty.FindPropertyRelative("EventTickrate");
145143
m_ClientConnectionBufferTimeoutProperty = m_NetworkConfigProperty.FindPropertyRelative("ClientConnectionBufferTimeout");
146144
m_ConnectionApprovalProperty = m_NetworkConfigProperty.FindPropertyRelative("ConnectionApproval");
147-
m_SecondsHistoryProperty = m_NetworkConfigProperty.FindPropertyRelative("SecondsHistory");
148145
m_EnableTimeResyncProperty = m_NetworkConfigProperty.FindPropertyRelative("EnableTimeResync");
149146
m_TimeResyncIntervalProperty = m_NetworkConfigProperty.FindPropertyRelative("TimeResyncInterval");
150147
m_EnableNetworkVariableProperty = m_NetworkConfigProperty.FindPropertyRelative("EnableNetworkVariable");
@@ -309,9 +306,6 @@ public override void OnInspectorGUI()
309306
EditorGUILayout.PropertyField(m_ClientConnectionBufferTimeoutProperty);
310307
}
311308

312-
EditorGUILayout.LabelField("Lag Compensation", EditorStyles.boldLabel);
313-
EditorGUILayout.PropertyField(m_SecondsHistoryProperty);
314-
315309
EditorGUILayout.LabelField("Spawning", EditorStyles.boldLabel);
316310
EditorGUILayout.PropertyField(m_CreatePlayerPrefabProperty);
317311
EditorGUILayout.PropertyField(m_ForceSamePrefabsProperty);

com.unity.multiplayer.mlapi/Runtime/Configuration/NetworkConfig.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public class NetworkConfig
8989
/// <summary>
9090
/// The amount of times per second internal frame events will occur, e.g. send checking.
9191
/// </summary>
92-
[Tooltip("The amount of times per second the internal event loop will run. This includes for example NetworkVariable checking and LagCompensation tracking")]
92+
[Tooltip("The amount of times per second the internal event loop will run. This includes for example NetworkVariable checking.")]
9393
public int EventTickrate = 64;
9494

9595
/// <summary>
@@ -110,12 +110,6 @@ public class NetworkConfig
110110
[Tooltip("The connection data sent along with connection requests")]
111111
public byte[] ConnectionData = new byte[0];
112112

113-
/// <summary>
114-
/// The amount of seconds to keep a lag compensation position history
115-
/// </summary>
116-
[Tooltip("The amount of seconds to keep lag compensation position history")]
117-
public int SecondsHistory = 5;
118-
119113
/// <summary>
120114
/// If your logic uses the NetworkTime, this should probably be turned off. If however it's needed to maximize accuracy, this is recommended to be turned on
121115
/// </summary>
@@ -233,7 +227,6 @@ public string ToBase64()
233227
writer.WriteInt32Packed(config.EventTickrate);
234228
writer.WriteInt32Packed(config.ClientConnectionBufferTimeout);
235229
writer.WriteBool(config.ConnectionApproval);
236-
writer.WriteInt32Packed(config.SecondsHistory);
237230
writer.WriteInt32Packed(config.LoadSceneTimeOut);
238231
writer.WriteBool(config.EnableTimeResync);
239232
writer.WriteBool(config.EnsureNetworkVariableLengthSafety);
@@ -278,7 +271,6 @@ public void FromBase64(string base64)
278271
config.EventTickrate = reader.ReadInt32Packed();
279272
config.ClientConnectionBufferTimeout = reader.ReadInt32Packed();
280273
config.ConnectionApproval = reader.ReadBool();
281-
config.SecondsHistory = reader.ReadInt32Packed();
282274
config.LoadSceneTimeOut = reader.ReadInt32Packed();
283275
config.EnableTimeResync = reader.ReadBool();
284276
config.EnsureNetworkVariableLengthSafety = reader.ReadBool();

0 commit comments

Comments
 (0)