You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wagner GFX edited this page Dec 4, 2024
·
3 revisions
This module's main use is to help debug code execution through the Profiler window. But the code is a useful template to create other profiler modules beyond just performance tracking.
CorePackage.Debugging.ProfilerAPI.ScriptWatcher
It works by wrapping your code with the functions Begin() and End(), or with a using statement.
Each time the wrapped code is executed, it will show:
As a green graph line in the Profiler module named Watches.
As a process named WatchedScript in the CPU Usage's timeline and hierarchy views.
This allows to easily pinpoint the exact frame the function is being called and identify execution data such as GCAlloc, execution time, performance spikes, etc.
Tip: To find the process in the Profiler's Hierarchy View, use the search box. The selected process will be highlighted when switching to the Timeline view.