Add conditional profiling in Editor (run only when using Profiler window)

This commit is contained in:
Wojtek Figat
2023-09-25 18:34:07 +02:00
parent 216a5e9f92
commit da47088250
6 changed files with 30 additions and 6 deletions

View File

@@ -175,4 +175,15 @@ void ProfilingToolsService::Dispose()
ProfilingTools::EventsGPU.SetCapacity(0);
}
bool ProfilingTools::GetEnabled()
{
return ProfilerCPU::Enabled && ProfilerGPU::Enabled;
}
void ProfilingTools::SetEnabled(bool enabled)
{
ProfilerCPU::Enabled = enabled;
ProfilerGPU::Enabled = enabled;
}
#endif