Voltray Engine Docs
Loading...
Searching...
No Matches
ResourceManager.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include <filesystem>
5
15{
16public:
21 static void Initialize(const std::string &executablePath);
22
28 static std::string GetResourcePath(const std::string &relativePath);
29
34 static std::string GetApplicationDirectory();
35
41 static bool ResourceExists(const std::string &relativePath);
42
43private:
44 static std::string s_executablePath;
45 static std::string s_applicationDirectory;
46 static std::string s_projectRoot;
47
53 static std::string FindProjectRoot(const std::string &startPath);
54};
Handles resource path resolution and asset management.
Definition ResourceManager.h:15
static std::string GetResourcePath(const std::string &relativePath)
Get the full path to a resource file.
Definition ResourceManager.cpp:22
static bool ResourceExists(const std::string &relativePath)
Check if a resource file exists.
Definition ResourceManager.cpp:64
static std::string GetApplicationDirectory()
Get the application directory (where the executable is located)
Definition ResourceManager.cpp:59
static void Initialize(const std::string &executablePath)
Initialize the resource manager with the executable path.
Definition ResourceManager.cpp:10