Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/FActiveExternalProfilerBase
Description
Static: Enables or disables calls to the active profiler's StartScopedEvent and EndScopedEvent functions.
This function calls OnEnableScopedEventsChanged on the active external profiler if the enabled status has changed.
External profilers may support initiating captures either from an external tool or via code. The performance cost of emitting scoped events varies by profiler. To minimize overhead, including calls to stubbed virtual functions, EnableScopedEvents can be used by a profiler implementation to control event emission.
Example scenarios:
A profiler that doesn't implement scoped events can disable scoped events to avoid the overhead of calling stubbed virtual functions.
A profiler that implements scoped events and initiates captures externally can leverage the default behavior of emitting events.
A profiler with high overhead scoped events may disable scoped events to avoid overhead and require explicit user action to enable them.
A profiler that uses code-initiated captures may enable scoped events when capture starts and disables events when the capture ends.
| Name | EnableScopedEvents |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/ProfilingDebugging/ExternalProfiler.h |
| Include Path | #include "ProfilingDebugging/ExternalProfiler.h" |
| Source | /Engine/Source/Runtime/Core/Private/ProfilingDebugging/ExternalProfiler.cpp |
static void EnableScopedEvents
(
bool bEnable
)