30#include <unordered_map>
34#include "../TaskSystem/TaskGraphTemplate.h"
159 std::unordered_map<AssetID, std::unique_ptr<TaskGraphTemplate>>
m_taskGraphs;
ComponentTypeID GetComponentTypeID_Static()
Singleton cache for engine assets.
AssetManager & operator=(const AssetManager &)=delete
std::unordered_map< AssetID, std::unique_ptr< TaskGraphTemplate > > m_taskGraphs
Cached task graph templates: AssetID -> owned template.
AssetID LoadTaskGraph(const std::string &path, std::vector< std::string > &outErrors)
Loads a TaskGraphTemplate from path and caches it.
static AssetID ComputeAssetID(const std::string &path)
Computes the 32-bit FNV-1a hash of a file path string.
const TaskGraphTemplate * LoadTaskGraphFromFile(const std::string &path, std::vector< std::string > &outErrors)
Loads a TaskGraphTemplate from path and returns a direct pointer.
void UnloadTaskGraph(AssetID id)
Releases the cached TaskGraphTemplate for id.
AssetManager(const AssetManager &)=delete
const TaskGraphTemplate * GetTaskGraph(AssetID id) const
Returns a non-owning pointer to the cached TaskGraphTemplate.
static AssetManager & Get()
Returns the singleton AssetManager instance.
Immutable, shareable task graph asset.
< Provides AssetID and INVALID_ASSET_ID
uint32_t AssetID
Opaque asset identifier: 32-bit FNV-1a hash of the asset file path.
static const AssetID INVALID_ASSET_ID
Sentinel value indicating an invalid / unloaded asset.