goToScene
Script::goToScene
Loads a scene from a file.
Declaration
void goToScene(const std::string& filePath);
Parameters
Name |
Type |
Description |
---|---|---|
filePath |
const std::string& |
Path to the scene to load. |
Returns
None.
Notes
Changing scene will destroy all non-persistent Entities, potentially including the Entity calling this function.
If this is the case, the rest of the script must not reference any function or variable belonging to this Entity. It is safer to return right after calling this function:
goToScene("assets/scenes/scene.ntsn");
return;
All particles will also be destroyed.