Add more profiler events to assets code
This commit is contained in:
@@ -272,6 +272,7 @@ String Asset::ToString() const
|
||||
|
||||
void Asset::OnDeleteObject()
|
||||
{
|
||||
PROFILE_CPU_NAMED("Asset.Unload");
|
||||
ASSERT(IsInMainThread());
|
||||
|
||||
// Send event to the gameplay so it can release handle to this asset
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Level/Prefabs/PrefabManager.h"
|
||||
#include "Engine/Level/Actor.h"
|
||||
#include "Engine/Profiler/ProfilerCPU.h"
|
||||
#include "Engine/Threading/Threading.h"
|
||||
#include "Engine/Scripting/Scripting.h"
|
||||
|
||||
@@ -22,6 +23,7 @@ Prefab::Prefab(const SpawnParams& params, const AssetInfo* info)
|
||||
|
||||
Guid Prefab::GetRootObjectId() const
|
||||
{
|
||||
PROFILE_CPU();
|
||||
ASSERT(IsLoaded());
|
||||
ScopeLock lock(Locker);
|
||||
|
||||
@@ -57,6 +59,7 @@ Actor* Prefab::GetDefaultInstance()
|
||||
// Skip if already created (reuse cached result)
|
||||
if (_defaultInstance)
|
||||
return _defaultInstance;
|
||||
PROFILE_CPU();
|
||||
|
||||
// Skip if not loaded
|
||||
if (!IsLoaded())
|
||||
|
||||
Reference in New Issue
Block a user