Handles resource path resolution and asset management.
More...
#include <ResourceManager.h>
|
static void | Initialize (const std::string &executablePath) |
| Initialize the resource manager with the executable path.
|
|
static std::string | GetResourcePath (const std::string &relativePath) |
| Get the full path to a resource file.
|
|
static std::string | GetApplicationDirectory () |
| Get the application directory (where the executable is located)
|
|
static bool | ResourceExists (const std::string &relativePath) |
| Check if a resource file exists.
|
|
Handles resource path resolution and asset management.
This class provides utilities to find resources relative to the executable or in standard system locations, ensuring resources can be found regardless of where the executable is run from.
◆ GetApplicationDirectory()
std::string ResourceManager::GetApplicationDirectory |
( |
| ) |
|
|
static |
Get the application directory (where the executable is located)
- Returns
- Path to the application directory
◆ GetResourcePath()
std::string ResourceManager::GetResourcePath |
( |
const std::string & |
relativePath | ) |
|
|
static |
Get the full path to a resource file.
- Parameters
-
relativePath | Relative path from the project root (e.g., "Editor/Resources/Fonts/Sora.ttf") |
- Returns
- Full path to the resource, or empty string if not found
◆ Initialize()
void ResourceManager::Initialize |
( |
const std::string & |
executablePath | ) |
|
|
static |
Initialize the resource manager with the executable path.
- Parameters
-
executablePath | Path to the current executable |
◆ ResourceExists()
bool ResourceManager::ResourceExists |
( |
const std::string & |
relativePath | ) |
|
|
static |
Check if a resource file exists.
- Parameters
-
relativePath | Relative path to the resource |
- Returns
- True if the resource exists, false otherwise
The documentation for this class was generated from the following files: