diff --git a/Editor/Timer/TimerComponentInspector.cs b/Editor/Timer/TimerComponentInspector.cs index f0045bd..e689fa9 100644 --- a/Editor/Timer/TimerComponentInspector.cs +++ b/Editor/Timer/TimerComponentInspector.cs @@ -56,12 +56,8 @@ namespace AlicizaX.Timer.Editor return; } - if (timerService is not ITimerServiceDebug debugView) - { - return; - } - debugView.GetStatistics(out _cachedActiveCount, out _cachedPoolCapacity, out _cachedPeakActiveCount, out _cachedFreeCount); + timerService.GetStatistics(out _cachedActiveCount, out _cachedPoolCapacity, out _cachedPeakActiveCount, out _cachedFreeCount); _cachedUsageText = _cachedPoolCapacity > 0 ? Utility.Text.Format("{0:F1}%", (float)_cachedActiveCount / _cachedPoolCapacity * 100f) : "0.0%"; @@ -74,13 +70,13 @@ namespace AlicizaX.Timer.Editor EditorGUILayout.LabelField("Free Slots", _cachedFreeCount.ToString()); EditorGUILayout.LabelField("Pool Usage", _cachedUsageText); - DrawTimerList(debugView, _cachedActiveCount); + DrawTimerList(timerService, _cachedActiveCount); #if UNITY_EDITOR - DrawLeakDetection(debugView, _cachedActiveCount); + DrawLeakDetection(timerService, _cachedActiveCount); #endif } - private void DrawTimerList(ITimerServiceDebug debug, int activeCount) + private void DrawTimerList(ITimerService debug, int activeCount) { EditorGUILayout.Space(); EditorGUILayout.LabelField("Active Timers", EditorStyles.boldLabel); @@ -123,7 +119,7 @@ namespace AlicizaX.Timer.Editor } #if UNITY_EDITOR - private void DrawLeakDetection(ITimerServiceDebug debug, int activeCount) + private void DrawLeakDetection(ITimerService debug, int activeCount) { if (activeCount <= 0) {