Responsible for creating and managing scenes, has full lifetime control of the existing scenes.
More...
#include <SceneManager.hpp>
Responsible for creating and managing scenes, has full lifetime control of the existing scenes.
Definition at line 13 of file SceneManager.hpp.
◆ CreateScene()
Creates a scene with the specified name and adds it to the cache.
- Parameters
-
| name | Name of the scene to create. |
Duplicate scene names are illegal.
- Returns
- Expected object with a non owning handle to the created scene on success or a CoriError<> on failure.
Definition at line 68 of file SceneManager.cpp.
◆ DestroyScene()
| std::expected< void, Core::CoriError<> > Cori::World::SceneManager::DestroyScene |
( |
const std::string & | name | ) |
|
|
staticnodiscard |
Destroys a scene with the specified name.
- Parameters
-
| name | Name of the scene to delete. |
- Returns
- Expected object with void on success or CoriError<> on failure.
Definition at line 92 of file SceneManager.cpp.
◆ GetHandle()
Allows you to get SceneHandle if all you know is scene id.
Each scene is assigned an ID at creation, entities have this ID and you can ask an entity what scene is it from, it will give you the owner scene id, you can "convert" this scene id into a useful handle here.
- Parameters
-
| sceneID | ID of the scene to get a handle for. |
- Returns
- Expected object with SceneHandle on success, CoriError on failure.
Definition at line 52 of file SceneManager.cpp.
◆ GetScene() [1/2]
Retries the scene with the specified name from the cache.
- Parameters
-
| name | Name of the scene to retrieve from cache. |
- Returns
- Expected object with a non owning handle to the created scene on success or a CoriError<> on failure.
Definition at line 36 of file SceneManager.cpp.
◆ GetScene() [2/2]
Retries the scene with the specified name from the cache.
- Parameters
-
| name | Name of the scene to retrieve from cache. |
- Returns
- Expected object with a non owning handle to the created scene on success or a CoriError<> on failure.
Definition at line 44 of file SceneManager.cpp.
The documentation for this class was generated from the following files: