| 626 | } |
| 627 | |
| 628 | ContentStats Content::GetStats() |
| 629 | { |
| 630 | ContentStats stats; |
| 631 | AssetsLocker.Lock(); |
| 632 | stats.AssetsCount = Assets.Count(); |
| 633 | int32 loadFailedCount = 0; |
| 634 | for (const auto& e : Assets) |
| 635 | { |
| 636 | if (e.Value->IsLoaded()) |
| 637 | stats.LoadedAssetsCount++; |
| 638 | else if (e.Value->LastLoadFailed()) |
| 639 | loadFailedCount++; |
| 640 | if (e.Value->IsVirtual()) |
| 641 | stats.VirtualAssetsCount++; |
| 642 | } |
| 643 | stats.LoadingAssetsCount = stats.AssetsCount - loadFailedCount - stats.LoadedAssetsCount; |
| 644 | AssetsLocker.Unlock(); |
| 645 | return stats; |
| 646 | } |
| 647 | |
| 648 | Asset* Content::LoadAsyncInternal(const StringView& internalPath, const MClass* type) |
| 649 | { |