SceneWorld World { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The World property of the SceneCamera class specifies the SceneWorld instance that the camera will render. This property is essential for determining which world the camera is focused on and will be used to render the scene accordingly.

Usage

To use the World property, you need to have an instance of SceneCamera. You can then get or set the World property to specify which SceneWorld the camera should render.

Example

// Create a new SceneCamera instance
SceneCamera camera = new SceneCamera();

// Create or get a SceneWorld instance
SceneWorld myWorld = new SceneWorld();

// Assign the SceneWorld to the camera's World property
camera.World = myWorld;

// Now the camera will render the specified SceneWorld
// You can also retrieve the current SceneWorld
SceneWorld currentWorld = camera.World;