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

Method SetAssetReferences

Engine/source/EtCore/Content/ResourceManager.cpp:47–60  ·  view source on GitHub ↗

---------------------------------- ResourceManager::SetAssetReferences Runs the setter function on each asset reference in the DB

Source from the content-addressed store, hash-verified

45// Runs the setter function on each asset reference in the DB
46//
47void ResourceManager::SetAssetReferences(AssetDatabase&db, T_ReferenceAssetGetter const& fnc) const
48{
49 for (AssetDatabase::AssetCache& cache : db.caches)
50 {
51 // every asset per cache
52 for (I_Asset* asset : cache.cache)
53 {
54 for (I_Asset::Reference& reference : asset->m_References)
55 {
56 reference.m_Asset = fnc(reference.m_Id);
57 }
58 }
59 }
60}
61
62
63} // namespace core

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected