Class GameProfiler
- Namespace
- Stride.CommunityToolkit.Scripts
- Assembly
- Stride.CommunityToolkit.dll
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.
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
Enables or disable the game profiling
public bool Enabled { get; set; }
Property Value
FilteringMode
Gets or sets the type of the profiling to display: CPU or GPU
[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 set 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()
Called once, as a microthread
public override Task Execute()