Add more memory profiling insights and groups
This commit is contained in:
@@ -7,12 +7,14 @@
|
||||
#include "Engine/Level/Level.h"
|
||||
#include "Engine/Level/Scene/Scene.h"
|
||||
#include "Engine/Profiler/ProfilerCPU.h"
|
||||
#include "Engine/Profiler/ProfilerMemory.h"
|
||||
#include "Engine/Threading/Threading.h"
|
||||
#include <ThirdParty/recastnavigation/DetourCrowd.h>
|
||||
|
||||
NavCrowd::NavCrowd(const SpawnParams& params)
|
||||
: ScriptingObject(params)
|
||||
{
|
||||
PROFILE_MEM(Navigation);
|
||||
_crowd = dtAllocCrowd();
|
||||
}
|
||||
|
||||
@@ -51,6 +53,7 @@ bool NavCrowd::Init(float maxAgentRadius, int32 maxAgents, NavMeshRuntime* navMe
|
||||
if (!_crowd || !navMesh)
|
||||
return true;
|
||||
PROFILE_CPU();
|
||||
PROFILE_MEM(Navigation);
|
||||
|
||||
// This can happen on game start when no navmesh is loaded yet (eg. navmesh tiles data is during streaming) so wait for navmesh
|
||||
if (navMesh->GetNavMesh() == nullptr)
|
||||
@@ -175,6 +178,7 @@ void NavCrowd::RemoveAgent(int32 id)
|
||||
void NavCrowd::Update(float dt)
|
||||
{
|
||||
PROFILE_CPU();
|
||||
PROFILE_MEM(Navigation);
|
||||
_crowd->update(Math::Max(dt, ZeroTolerance), nullptr);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user