diff --git a/UnityProject/Assets/Dependencies/JEngine/Core/Util/FpsMonitor.cs b/UnityProject/Assets/Dependencies/JEngine/Core/Util/FpsMonitor.cs index e2b0b6ef..35608866 100644 --- a/UnityProject/Assets/Dependencies/JEngine/Core/Util/FpsMonitor.cs +++ b/UnityProject/Assets/Dependencies/JEngine/Core/Util/FpsMonitor.cs @@ -8,7 +8,7 @@ public static class FpsMonitor public static long TotalFrames => _totalFrames; private static int _frames; - private static int _backupFrames; + private static int _backupFrames = Application.targetFrameRate > 0 ? Application.targetFrameRate : 60; private static float _timer = 1; private static long _totalFrames; @@ -21,9 +21,8 @@ private static void Update() { //增加帧率 ++_frames; - ++_backupFrames; ++_totalFrames; - + //计时器刷新 _timer -= Time.deltaTime;