Merge remote-tracking branch 'origin/master' into 1.13
# Conflicts: # Flax.flaxproj # Source/Engine/Level/Actors/StaticModel.cpp # Source/Engine/Level/Prefabs/Prefab.cpp # Source/Engine/Tools/ModelTool/ModelTool.cpp
This commit is contained in:
@@ -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,11 +59,12 @@ Actor* Prefab::GetDefaultInstance()
|
||||
// Skip if already created (reuse cached result)
|
||||
if (_defaultInstance)
|
||||
return _defaultInstance;
|
||||
PROFILE_CPU();
|
||||
|
||||
// Skip if not loaded
|
||||
if (!IsLoaded())
|
||||
{
|
||||
LOG(Warning, "Cannot instantiate object from not loaded prefab asset '{}'", GetPath());
|
||||
LOG(Warning, "Cannot instantiate object from not loaded prefab asset ({}, {})", GetPath(), GetID());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user