Skip to content

Commit 6119a15

Browse files
committed
Help text to guide to console
1 parent 5ae3764 commit 6119a15

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Assets/Game/Stats.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ public void Init()
2626

2727
private void CmdShowstats(string[] args)
2828
{
29-
m_ShowStats = (m_ShowStats + 1) % 3;
29+
if (args.Length != 1)
30+
return;
31+
int.TryParse(args[0], out m_ShowStats);
3032
}
3133

3234
void CalcStatistics(float[] data, out float mean, out float variance, out float minValue, out float maxValue)
@@ -69,6 +71,8 @@ public void TickUpdate()
6971
DebugOverlay.Write(1, 0, "FPS:{0,6:###.##}", 1.0f / Time.deltaTime);
7072
fpsHistory[Time.frameCount % fpsHistory.Length] = 1.0f / Time.deltaTime;
7173
DebugOverlay.DrawGraph(1, 1, 9, 1.5f, fpsHistory, Time.frameCount % fpsHistory.Length, Color.green);
74+
75+
DebugOverlay.Write(30, 0, "Open console (F12) and type: \"showstats 2\" for more graphs");
7276

7377
if (m_ShowStats < 2)
7478
return;

0 commit comments

Comments
 (0)