![]() |
Raven Engine v0.1
|
Represents an active project including configuration and directory management. More...
#include <Project.h>
Public Member Functions | |
| ProjectConfig & | GetConfig () |
| Gets a mutable reference to the current project configuration. | |
Static Public Member Functions | |
| static const std::filesystem::path | GetProjectDirectory () |
| Gets the root directory of the currently active project. | |
| static std::filesystem::path | GetAssetDirectory () |
| Gets the full path to the asset directory of the active project. | |
| static std::filesystem::path | GetAssetFileSystemPath (const std::filesystem::path &path) |
| Resolves a relative asset path against the active project's asset directory. | |
| static Ref< Project > | GetActiveProject () |
| Gets a reference-counted pointer to the active project instance. | |
| static Ref< Project > | New () |
| Creates a new, empty project instance and sets it as active. | |
| static Ref< Project > | Load (const std::filesystem::path &path) |
| Loads a project from a file and sets it as the active project. | |
| static bool | SaveActive (const std::filesystem::path &path) |
| Saves the currently active project to the given file path. | |
Represents an active project including configuration and directory management.
This singleton-style class manages the currently loaded project, including loading, saving, and providing access to project-related paths.
Gets a reference-counted pointer to the active project instance.
|
inlinestatic |
Gets the full path to the asset directory of the active project.
Logs an error and returns an empty path if no project is active.
|
inlinestatic |
Resolves a relative asset path against the active project's asset directory.
| path | Relative path to an asset. |
Logs an error and returns an empty path if no project is active.
|
inline |
Gets a mutable reference to the current project configuration.
|
inlinestatic |
Gets the root directory of the currently active project.
Logs an error and returns an empty path if no project is active.
Loads a project from a file and sets it as the active project.
| path | Filesystem path to the project file. |
Creates a new, empty project instance and sets it as active.
|
static |
Saves the currently active project to the given file path.
| path | Filesystem path where to save the project. |