[ContentLoadTask]
| 522 | protected: |
| 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 | { |
nothing calls this directly
no test coverage detected