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

Method run

Source/Engine/Content/BinaryAsset.cpp:524–542  ·  view source on GitHub ↗

[ContentLoadTask]

Source from the content-addressed store, hash-verified

522protected:
523 // [ContentLoadTask]
524 Result run() override
525 {
526 AssetReference<BinaryAsset> ref = _asset.Get();
527 if (ref == nullptr)
528 return Result::MissingReferences;
529 auto storage = ref->Storage;
530 auto factory = (BinaryAssetFactoryBase*)Content::GetAssetFactory(ref->GetTypeName());
531 ASSERT(factory);
532 PROFILE_MEM(ContentAssets);
533
534 // Here we should open storage and extract AssetInitData
535 // This would also allow to convert/upgrade data
536 if (!storage->IsLoaded() && storage->Load())
537 return Result::AssetLoadError;
538 if (factory->Init(ref.Get()))
539 return Result::AssetLoadError;
540
541 return Result::Ok;
542 }
543
544 void OnEnd() override
545 {

Callers

nothing calls this directly

Calls 5

GetMethod · 0.45
GetTypeNameMethod · 0.45
IsLoadedMethod · 0.45
LoadMethod · 0.45
InitMethod · 0.45

Tested by

no test coverage detected