Class GameProfiler
Provides in-game profiling functionality, allowing the monitoring and analysis of game performance in real time. This script facilitates the toggling of profiling, setting display preferences, and navigating through profiling data.
[Display("Game Profiler", null)]
[ComponentCategory("Debug")]
public class GameProfiler : AsyncScript, IIdentifiable, ICollectorHolder
- Inheritance
-
GameProfiler
- Implements
- Inherited Members
- Extension Methods
Remarks
This class provides keyboard shortcuts for toggling the profiler on/off with Shift + Ctrl + P, changing the filtering mode with F1, altering the sorting mode with F2, navigating result pages with F3 and F4, and adjusting the refresh interval with the plus and minus keys.
Properties
Enabled
Gets or sets whether profiling is enabled.
public bool Enabled { get; set; }
Property Value
FilteringMode
Gets or sets which profiling results are displayed: frame rate, CPU events or GPU events.
[Display(0, "Filter", null)]
public GameProfilingResults FilteringMode { get; set; }
Property Value
RefreshTime
The time between two refreshes of the profiling information in milliseconds.
[Display(2, "Refresh interval (ms)", null)]
public double RefreshTime { get; set; }
Property Value
ResultPage
Gets or sets the current profiling result page to display.
[Display(3, "Display page", null)]
public uint ResultPage { get; set; }
Property Value
SortingMode
Gets or sets the sorting mode of the profiling entries.
[Display(1, "Sort by", null)]
public GameProfilingSorting SortingMode { get; set; }
Property Value
TextColor
The color of the text displayed during profiling
[Display(4, "Text color", null)]
public Color TextColor { get; set; }
Property Value
Methods
Execute()
Main asynchronous loop that applies user input to configure and display profiling information.
public override Task Execute()