From 91f55cd9a3c9dcc8a11fa158394004f1132396b6 Mon Sep 17 00:00:00 2001 From: PopSlime Date: Tue, 31 Jan 2023 15:54:46 +0800 Subject: [PATCH] Add state count debug info. --- Assets/Cryville/Crtr/ChartPlayer.cs | 32 +++++++++++++++++------------ 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/Assets/Cryville/Crtr/ChartPlayer.cs b/Assets/Cryville/Crtr/ChartPlayer.cs index 34775a2..cb278cf 100644 --- a/Assets/Cryville/Crtr/ChartPlayer.cs +++ b/Assets/Cryville/Crtr/ChartPlayer.cs @@ -237,23 +237,29 @@ namespace Cryville.Crtr { }); logs.text = _logs.Substring(Mathf.Max(0, _logs.IndexOf('\n', Mathf.Max(0, _logs.Length - 4096)))); var sttext = string.Format( - "FPS: i{0:0} / s{1:0}\nSMem: {2:N0} / {3:N0}\nIMem: {4:N0} / {5:N0}", - 1 / Time.deltaTime, - 1 / Time.smoothDeltaTime, + "FPS: i{0:0} / s{1:0}\nSMem: {2:N0} / {3:N0}\nIMem: {4:N0} / {5:N0}", + 1 / Time.deltaTime, + 1 / Time.smoothDeltaTime, #if UNITY_5_6_OR_NEWER - UnityEngine.Profiling.Profiler.GetMonoUsedSizeLong(), - UnityEngine.Profiling.Profiler.GetMonoHeapSizeLong(), - UnityEngine.Profiling.Profiler.GetTotalAllocatedMemoryLong(), - UnityEngine.Profiling.Profiler.GetTotalReservedMemoryLong() + UnityEngine.Profiling.Profiler.GetMonoUsedSizeLong(), + UnityEngine.Profiling.Profiler.GetMonoHeapSizeLong(), + UnityEngine.Profiling.Profiler.GetTotalAllocatedMemoryLong(), + UnityEngine.Profiling.Profiler.GetTotalReservedMemoryLong() #else - UnityEngine.Profiling.Profiler.GetMonoUsedSize(), - UnityEngine.Profiling.Profiler.GetMonoHeapSize(), - UnityEngine.Profiling.Profiler.GetTotalAllocatedMemory(), - UnityEngine.Profiling.Profiler.GetTotalReservedMemory() + UnityEngine.Profiling.Profiler.GetMonoUsedSize(), + UnityEngine.Profiling.Profiler.GetMonoHeapSize(), + UnityEngine.Profiling.Profiler.GetTotalAllocatedMemory(), + UnityEngine.Profiling.Profiler.GetTotalReservedMemory() #endif + ); + if (started) { + sttext += string.Format( + "\nStates: c{0} / b{1}", + cbus.ActiveStateCount, bbus.ActiveStateCount ); - sttext += timetext; - if (judge != null) sttext += "\n== Scores ==\n" + judge.GetFullFormattedScoreString(); + sttext += timetext; + if (judge != null) sttext += "\n== Scores ==\n" + judge.GetFullFormattedScoreString(); + } status.text = sttext; } void OnCameraPostRender(Camera cam) {