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

Method DeleteAsset

Source/Engine/Content/Content.cpp:791–806  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

789}
790
791void Content::DeleteAsset(Asset* asset)
792{
793 if (asset == nullptr || asset->_deleteFileOnUnload)
794 return;
795
796 LOG(Info, "Deleting asset {0}...", asset->ToString());
797
798 // Ensure that asset is loaded (easier than cancel in-flight loading)
799 asset->WaitForLoaded();
800
801 // Mark asset for delete queue (delete it after auto unload)
802 asset->_deleteFileOnUnload = true;
803
804 // Unload
805 asset->DeleteObject();
806}
807
808void Content::DeleteScript(const StringView& path)
809{

Callers 2

OnDeleteObjectMethod · 0.45
DeleteMethod · 0.45

Calls 4

GetAssetFunction · 0.85
WaitForLoadedMethod · 0.80
DeleteObjectMethod · 0.80
ToStringMethod · 0.45

Tested by

no test coverage detected