MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / ChangeID

Method ChangeID

Source/Engine/Content/Asset.cpp:375–388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

373}
374
375void Asset::ChangeID(const Guid& newId)
376{
377 // Only virtual asset can change ID
378 if (!IsVirtual())
379 CRASH;
380
381 // ID has to be unique
382 if (Content::GetAsset(newId) != nullptr)
383 CRASH;
384
385 const Guid oldId = _id;
386 ManagedScriptingObject::ChangeID(newId);
387 Content::onAssetChangeId(this, oldId, newId);
388}
389
390#if USE_EDITOR
391

Callers 1

TestPrefabs.cppFile · 0.45

Calls 2

IsVirtualFunction · 0.85
GetAssetFunction · 0.85

Tested by

no test coverage detected