Add support for loading prefab instance if the root was changed or deleted

#2050
This commit is contained in:
Wojtek Figat
2023-12-14 10:47:22 +01:00
parent 1874382816
commit e0a085adfe
9 changed files with 360 additions and 115 deletions

View File

@@ -310,6 +310,10 @@ void Asset::ChangeID(const Guid& newId)
if (!IsVirtual())
CRASH;
// ID has to be unique
if (Content::GetAsset(newId) != nullptr)
CRASH;
const Guid oldId = _id;
ManagedScriptingObject::ChangeID(newId);
Content::onAssetChangeId(this, oldId, newId);