Skip to content

Commit 565b469

Browse files
update
Defaulting the lerp smoothing to true (like it was originally when you couldn't enable/disable it). Removing debug script from NetworkManager.
1 parent 9fbc654 commit 565b469

File tree

2 files changed

+3
-38
lines changed

2 files changed

+3
-38
lines changed

com.unity.netcode.gameobjects/Runtime/Components/NetworkTransform.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,7 +1046,7 @@ public enum InterpolationTypes
10461046
/// <remarks>
10471047
/// When enabled, the <see cref="BufferedLinearInterpolator{T}"/> will apply a final lerping pass where the "t" parameter is calculated by dividing the frame time divided by the <see cref="PositionMaxInterpolationTime"/>.
10481048
/// </remarks>
1049-
public bool PositionLerpSmoothing;
1049+
public bool PositionLerpSmoothing = true;
10501050
private bool m_PreviousPositionLerpSmoothing;
10511051

10521052
/// <summary>
@@ -1069,7 +1069,7 @@ public enum InterpolationTypes
10691069
/// <remarks>
10701070
/// When enabled, the <see cref="BufferedLinearInterpolator{T}"/> will apply a final lerping pass where the "t" parameter is calculated by dividing the frame time divided by the <see cref="RotationMaxInterpolationTime"/>.
10711071
/// </remarks>
1072-
public bool RotationLerpSmoothing;
1072+
public bool RotationLerpSmoothing = true;
10731073
private bool m_PreviousRotationLerpSmoothing;
10741074

10751075
/// <summary>
@@ -1092,7 +1092,7 @@ public enum InterpolationTypes
10921092
/// <remarks>
10931093
/// When enabled, the <see cref="BufferedLinearInterpolator{T}"/> will apply a final lerping pass where the "t" parameter is calculated by dividing the frame time divided by the <see cref="ScaleMaxInterpolationTime"/>.
10941094
/// </remarks>
1095-
public bool ScaleLerpSmoothing;
1095+
public bool ScaleLerpSmoothing = true;
10961096
private bool m_PreviousScaleLerpSmoothing;
10971097

10981098
/// <summary>

com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -312,41 +312,6 @@ private void UpdateTopology()
312312
IsDistributedAuthority = DistributedAuthorityMode = transportTopology == NetworkTopologyTypes.DistributedAuthority;
313313
}
314314
}
315-
#if COM_UNITY_MODULES_PHYSICS
316-
internal void CheckNetworkTransformsForDuplicateRegistrations()
317-
{
318-
var uniqueEntries = new Dictionary<ulong, NetworkObject>();
319-
var uniqueNetworkTransforms = new Dictionary<ulong, Dictionary<int, NetworkTransform>>();
320-
foreach (var networkObject in NetworkTransformFixedUpdate.Values)
321-
{
322-
if (!uniqueEntries.ContainsKey(networkObject.NetworkObjectId))
323-
{
324-
uniqueEntries.Add(networkObject.NetworkObjectId, networkObject);
325-
uniqueNetworkTransforms.Add(networkObject.NetworkObjectId, new Dictionary<int, NetworkTransform>());
326-
foreach (var networkTransform in networkObject.NetworkTransforms)
327-
{
328-
if (!uniqueNetworkTransforms.ContainsKey(networkTransform.NetworkBehaviourId))
329-
{
330-
if (!uniqueNetworkTransforms[networkObject.NetworkObjectId].ContainsKey(networkTransform.NetworkBehaviourId))
331-
{
332-
uniqueNetworkTransforms[networkObject.NetworkObjectId].Add(networkTransform.NetworkBehaviourId, networkTransform);
333-
}
334-
else
335-
{
336-
Debug.LogError($"{networkObject.name}-{networkObject.NetworkObjectId} {nameof(NetworkTransform)}-{networkTransform.NetworkBehaviourId} has a duplicate {nameof(NetworkTransform)} entry!");
337-
}
338-
}
339-
}
340-
}
341-
else
342-
{
343-
Debug.LogError($"{networkObject.name}-{networkObject.NetworkObjectId} has a duplicate update entry!");
344-
}
345-
}
346-
Debug.Log($"There are {NetworkTransformFixedUpdate.Count} NetworkTransforms registered for the fixed update.");
347-
Debug.Log($"There are {NetworkTransformUpdate.Count} NetworkTransforms registered for the normal update.");
348-
}
349-
#endif
350315

351316
public void NetworkUpdate(NetworkUpdateStage updateStage)
352317
{

0 commit comments

Comments
 (0)