File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -86,14 +86,24 @@ public static bool IsKeyBindingsEnabled
8686 }
8787
8888 /// <summary>
89- /// The key used to toggle the dev console window, NULL if no key.
89+ /// Key used to toggle the dev console window, NULL if no key.
9090 /// </summary>
9191 public static InputKey ? ToggleKey
9292 {
9393 get => _console . ConsoleToggleKey ;
9494 set => _console . ConsoleToggleKey = value ;
9595 }
9696
97+ /// <summary>
98+ /// Current average FPS. -1 if the fps is not being calculated.
99+ /// </summary>
100+ public static int AverageFps => _console . AverageFps ;
101+
102+ /// <summary>
103+ /// Current average milliseconds per frame (in seconds). -1 if the fps is not being calculated.
104+ /// </summary>
105+ public static float AverageMs => _console . AverageMs ;
106+
97107 #endregion
98108
99109 #region Events
Original file line number Diff line number Diff line change @@ -448,6 +448,16 @@ internal sealed class DevConsoleMono : MonoBehaviour
448448 /// </summary>
449449 internal bool BindingsIsEnabled { get ; set ; } = true ;
450450
451+ /// <summary>
452+ /// Average fps. -1 if fps is not being calcualted.
453+ /// </summary>
454+ internal int AverageFps => _isDisplayingFps ? _fps : - 1 ;
455+
456+ /// <summary>
457+ /// Average ms per frame. -1 if fps is not being calculated.
458+ /// </summary>
459+ internal float AverageMs => _isDisplayingFps ? _fpsMs : - 1f ;
460+
451461 /// <summary>
452462 /// The text entered by the user in the input field.
453463 /// </summary>
You can’t perform that action at this time.
0 commit comments