Release Prefab assets when reloading Scripting service
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include "Engine/Graphics/RenderTask.h"
|
||||
#include "Engine/Serialization/JsonTools.h"
|
||||
#include "Engine/Profiler/ProfilerCPU.h"
|
||||
#include "Engine/Level/Prefabs/Prefab.h"
|
||||
|
||||
extern void registerFlaxEngineInternalCalls();
|
||||
|
||||
@@ -141,7 +142,10 @@ namespace
|
||||
{
|
||||
if (asset->GetTypeHandle().Module == flaxModule)
|
||||
{
|
||||
continue;
|
||||
// Release also prefabs as those might contain scene objects using assets from other assemblies
|
||||
Prefab* prefab = dynamic_cast<Prefab*>(asset);
|
||||
if (prefab == nullptr)
|
||||
continue;
|
||||
}
|
||||
|
||||
asset->DeleteObject();
|
||||
|
||||
Reference in New Issue
Block a user