From 1cbc3f78a34152fac8e7ae37cd5afe8ed56d5b4e Mon Sep 17 00:00:00 2001 From: MrGadget1024 <9826063+MrGadget1024@users.noreply.github.com> Date: Fri, 17 Mar 2023 08:08:17 -0400 Subject: [PATCH] Added DriftEMA, DeliveryTimeEMA, and RTT to NetworkClient OnGUI --- Assets/Mirror/Core/NetworkClient.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Assets/Mirror/Core/NetworkClient.cs b/Assets/Mirror/Core/NetworkClient.cs index 0cfd10462..0d3994372 100644 --- a/Assets/Mirror/Core/NetworkClient.cs +++ b/Assets/Mirror/Core/NetworkClient.cs @@ -1692,7 +1692,7 @@ public static void OnGUI() // only if in world if (!ready) return; - GUILayout.BeginArea(new Rect(10, 5, 500, 50)); + GUILayout.BeginArea(new Rect(10, 5, 800, 50)); GUILayout.BeginHorizontal("Box"); GUILayout.Label("Snapshot Interp.:"); @@ -1702,8 +1702,11 @@ public static void OnGUI() else GUI.color = Color.white; GUILayout.Box($"timeline: {localTimeline:F2}"); GUILayout.Box($"buffer: {snapshots.Count}"); + GUILayout.Box($"DriftEMA: {NetworkClient.driftEma.Value:F2}"); + GUILayout.Box($"DelTimeEMA: {NetworkClient.deliveryTimeEma.Value:F2}"); GUILayout.Box($"timescale: {localTimescale:F2}"); GUILayout.Box($"BTM: {snapshotSettings.bufferTimeMultiplier:F2}"); + GUILayout.Box($"RTT: {NetworkTime.rtt * 1000:000}"); GUILayout.EndHorizontal(); GUILayout.EndArea();