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

Method GetStats

Source/Engine/Content/Content.cpp:628–646  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

626}
627
628ContentStats 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
648Asset* Content::LoadAsyncInternal(const StringView& internalPath, const MClass* type)
649{

Callers 1

UpdateStatsMethod · 0.45

Calls 5

LockMethod · 0.80
IsVirtualMethod · 0.80
UnlockMethod · 0.80
CountMethod · 0.45
IsLoadedMethod · 0.45

Tested by

no test coverage detected