Hi,
I’m not sure if profiling tool works with consoles, so I decided to put on game’s screen information about CPU and Memory usage.
I managed to get CPU data, but it displays zeros in Memory data. I turned on Enable Memory Tracking in Project Settings → Plugins → FMOD Studio, but it still doesn’t do anything.
This is what I do:
FMOD_STUDIO_CPU_USAGE CPUUsage;
FMOD_STUDIO_MEMORY_USAGE MemoryUsage;
FMOD::Studio::System* StudioSystem = IFMODStudioModule::Get().GetStudioSystem(EFMODSystemContext::Runtime);
FMOD_RESULT Result = StudioSystem->getCPUUsage(&CPUUsage);
if (Result == FMOD_RESULT::FMOD_OK)
{
Result = StudioSystem->getMemoryUsage(&MemoryUsage);
if (Result == FMOD_RESULT::FMOD_OK)
{
FString String = FString::Printf(TEXT("FMOD CPU:\n- dsp: %f\n- stream: %f\n- geometry: %f\n- coreupdate: %f\n- studioupdate: "
"%f\nFMOD MEMORY:\n- exclusive: %f\n- inclusive: %f\n- sampledata: %f"),
CPUUsage.dspusage,
CPUUsage.streamusage,
CPUUsage.geometryusage,
CPUUsage.updateusage,
CPUUsage.studiousage,
MemoryUsage.exclusive,
MemoryUsage.inclusive,
MemoryUsage.sampledata);
GEngine->AddOnScreenDebugMessage(-1, DeltaTime, FColor::FromHex("#FFC0CB"), String);
}
}
Any idea what I might be doing wrong?