Description
The CreateSceneWorld
method is a static method of the Editor.EditorUtility
class. It is used to create a new instance of a SceneWorld
, which represents a world or environment in which scenes can be loaded and manipulated. This method is particularly useful in the context of game development and editing, where multiple scene worlds might be needed for different purposes such as testing, simulation, or level design.
Usage
To use the CreateSceneWorld
method, simply call it from the Editor.EditorUtility
class without any parameters. The method will return a new SceneWorld
object that you can then use to manage scenes.
Example
// Example of creating a new SceneWorld
SceneWorld newWorld = Editor.EditorUtility.CreateSceneWorld();
// Use the new SceneWorld for further operations
// For example, you might load a scene into this world
// SceneManager.LoadScene("MyScene", newWorld);