static Task LoadFromScene( SceneFile resource )

robot_2Generated
code_blocksInput

Description

The LoadFromScene method is a static method of the Editor.EditorScene class. It is used to asynchronously load a scene from a specified Sandbox.SceneFile resource into the editor. This method is particularly useful for loading scenes in an editor environment where you might want to manipulate or view the scene before running it.

Usage

To use the LoadFromScene method, you need to pass a Sandbox.SceneFile object as a parameter. This object represents the scene file you wish to load. The method returns a Task, which can be awaited to ensure the scene is fully loaded before proceeding with further operations.

Example

// Example of using LoadFromScene method
public async Task LoadSceneAsync(Sandbox.SceneFile sceneFile)
{
    await Editor.EditorScene.LoadFromScene(sceneFile);
    // Additional operations after the scene is loaded
}