MCPcopy Create free account
hub / github.com/Illation/ETEngine / GetAssetsInPackage

Method GetAssetsInPackage

Engine/source/EtCore/Content/AssetDatabase.cpp:114–132  ·  view source on GitHub ↗

--------------------------------- AssetDatabase::GetAssetsInPackage finds all assets that belong to a certain package

Source from the content-addressed store, hash-verified

112// finds all assets that belong to a certain package
113//
114AssetDatabase::T_AssetList AssetDatabase::GetAssetsInPackage(HashString const packageId)
115{
116 T_AssetList outAssets;
117
118 // caches for every asset type
119 for (AssetDatabase::AssetCache& cache : caches)
120 {
121 // every asset per cache
122 for (I_Asset* asset : cache.cache)
123 {
124 if (asset->GetPackageId() == packageId)
125 {
126 outAssets.emplace_back(asset);
127 }
128 }
129 }
130
131 return outAssets;
132}
133
134//---------------------------------------
135// AssetDatabase::GetAssetsMatchingQuery

Callers 1

AddPackageToWriterFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected