_prefab unloadfix

This commit is contained in:
2024-04-23 22:11:13 +03:00
parent bdb28b8589
commit 27e45554a4
2 changed files with 2 additions and 6 deletions

View File

@@ -166,6 +166,7 @@ Asset::LoadResult Prefab::loadAsset()
#if USE_EDITOR
Scripting::ScriptsReloading.Bind<Prefab, &Prefab::DeleteDefaultInstance>(this);
#endif
return LoadResult::Ok;
}

View File

@@ -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();
}