bool Load( GameResource resource )
bool Load( SceneLoadOptions options )

robot_2Generated
code_blocksInput

Description

The Load method in the Scene class is responsible for loading a scene from a specified GameResource. This method is virtual, allowing derived classes to override its behavior if necessary. It returns a boolean value indicating whether the scene was successfully loaded.

Usage

To use the Load method, you need to have a GameResource that represents the scene you want to load. Call the method on an instance of the Scene class, passing the GameResource as a parameter. The method will return true if the scene is loaded successfully, otherwise false.

Example

// Example of using the Load method
Scene myScene = new Scene();
GameResource myResource = new GameResource("path/to/resource");

bool isLoaded = myScene.Load(myResource);

if (isLoaded)
{
    // Scene loaded successfully
}
else
{
    // Handle loading failure
}