Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -21,9 +21,8 @@ private static void Update()
{
//增加帧率
++_frames;
++_backupFrames;
++_totalFrames;

//计时器刷新
_timer -= Time.deltaTime;

Expand Down