Finality Engine
Loading...
Searching...
No Matches
FINALITY::AssetRegistry Class Reference

Tracks project assets, metadata and reference resolution. More...

#include <AssetRegistry.h>

Static Public Member Functions

static void Open (const std::filesystem::path &projectDirectory)
static void SetRuntimeCacheDirectory (const std::filesystem::path &directory)
 Overrides where runtime import/database caches are written.
static std::filesystem::path GetCacheDirectory ()
static void Close ()
static void Scan ()
static void Reimport (uint64_t id)
static bool Import (const std::filesystem::path &source, const std::filesystem::path &destination="Assets")
static bool Move (uint64_t id, const std::filesystem::path &destination)
static bool Save ()
static const std::map< uint64_t, AssetRecord > & GetRecords ()
static const AssetRecord * Find (uint64_t id)
static const AssetRecord * FindPath (const std::filesystem::path &path)
static std::string Resolve (const std::string &reference)
static std::string Reference (const std::filesystem::path &path)
static const std::filesystem::path & GetProjectDirectory ()
static ProjectAssetType GetType (const std::filesystem::path &path)

Detailed Description

Tracks project assets, metadata and reference resolution.

The registry maps stable asset IDs to project-relative paths and records dependencies, status and diagnostics. Runtime cache location can be redirected so a packaged game does not write imported data into its installation.

Usage
Open the project before scanning or resolving its references. Use Move for asset moves so metadata stays associated with the source asset. Resolve converts stored references to usable paths.

Definition at line 47 of file AssetRegistry.h.

Member Function Documentation

◆ Open()

void FINALITY::AssetRegistry::Open ( const std::filesystem::path & projectDirectory)
static

◆ SetRuntimeCacheDirectory()

void FINALITY::AssetRegistry::SetRuntimeCacheDirectory ( const std::filesystem::path & directory)
static

Overrides where runtime import/database caches are written.

Parameters
directoryWritable cache directory for this runtime instance or project. Packaged players use local application data so imported data does not modify the installed game assets. Configure this before loading runtime assets.

◆ GetCacheDirectory()

std::filesystem::path FINALITY::AssetRegistry::GetCacheDirectory ( )
static

◆ Close()

void FINALITY::AssetRegistry::Close ( )
static

◆ Scan()

void FINALITY::AssetRegistry::Scan ( )
static

◆ Reimport()

void FINALITY::AssetRegistry::Reimport ( uint64_t id)
static

◆ Import()

bool FINALITY::AssetRegistry::Import ( const std::filesystem::path & source,
const std::filesystem::path & destination = "Assets" )
static

◆ Move()

bool FINALITY::AssetRegistry::Move ( uint64_t id,
const std::filesystem::path & destination )
static

◆ Save()

bool FINALITY::AssetRegistry::Save ( )
static

◆ GetRecords()

const std::map< uint64_t, AssetRecord > & FINALITY::AssetRegistry::GetRecords ( )
static

◆ Find()

const AssetRecord * FINALITY::AssetRegistry::Find ( uint64_t id)
static

◆ FindPath()

const AssetRecord * FINALITY::AssetRegistry::FindPath ( const std::filesystem::path & path)
static

◆ Resolve()

std::string FINALITY::AssetRegistry::Resolve ( const std::string & reference)
static

◆ Reference()

std::string FINALITY::AssetRegistry::Reference ( const std::filesystem::path & path)
static

◆ GetProjectDirectory()

const std::filesystem::path & FINALITY::AssetRegistry::GetProjectDirectory ( )
static

◆ GetType()

ProjectAssetType FINALITY::AssetRegistry::GetType ( const std::filesystem::path & path)
static

The documentation for this class was generated from the following file: