Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

SceneManager

Add this in your code:

#include <engine/scene_manager/scene_manager.h>

Description

Class to load scenes.

Static methods


LoadScene

Load a scene.

Parameters:

  • scene: Scene to load
void LoadScene(const std::shared_ptr<Scene>& scene)

Code sample:

std::shared_ptr<Scene> sceneToLoad; // Filled variable

SceneManager::LoadScene(sceneToLoad);

ReloadScene

Reload the current scene.

void ReloadScene()

Code sample:

SceneManager::ReloadScene();

GetOpenedScene

Get opened scene.

const std::shared_ptr<Scene>& GetOpenedScene()

Code sample:

std::shared_ptr<Scene> currentScene = SceneManager::GetOpenedScene();