_prefab unloadfix
This commit is contained in:
@@ -166,6 +166,7 @@ Asset::LoadResult Prefab::loadAsset()
|
||||
#if USE_EDITOR
|
||||
Scripting::ScriptsReloading.Bind<Prefab, &Prefab::DeleteDefaultInstance>(this);
|
||||
#endif
|
||||
|
||||
|
||||
return LoadResult::Ok;
|
||||
}
|
||||
|
||||
@@ -141,12 +141,7 @@ namespace
|
||||
for (auto asset : assets)
|
||||
{
|
||||
if (asset->GetTypeHandle().Module == flaxModule)
|
||||
{
|
||||
// Release also prefabs as those might contain scene objects using assets from other assemblies
|
||||
Prefab* prefab = dynamic_cast<Prefab*>(asset);
|
||||
if (prefab == nullptr)
|
||||
continue;
|
||||
}
|
||||
continue;
|
||||
|
||||
asset->DeleteObject();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user