Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/FActiveExternalProfilerBase
Description
Attach an external profiler, selected depending on configuration.
Normally, no external profiler is selected, but one can be set using one of the following:
A command line argument -ProfilerName_, where ProfilerName_ matches the string returned by `FExternalProfiler::GetProfilerName()_
The environment variable UE_EXTERNAL_PROFILER=ProfilerName_, where ProfilerName_ matches the string returned by `FExternalProfiler::GetProfilerName()_
The DefaultEngine.ini config variable [Core.ProfilingDebugging]:ExternalProfiler_, where the value is a string that matches the string returned by FExternalProfiler::GetProfilerName()_.
In that order of priority. If no profiler is found matching these criteria, no profiler (nullptr) is attached.
To make a profiler discoverable by this function, register it into the `FExternalProfiler_ modular feature.
The search for a selected profiler is only performed once and then cached. On subsequent calls, the cached result is returned.
| Name | InitActiveProfiler |
| 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 FExternalProfiler * InitActiveProfiler()