Description
The World
property of the ScenePanel
class provides a shortcut to the Camera.World
. It allows you to access the SceneWorld
associated with the camera used in the scene panel. This property is useful for managing and interacting with the scene world that is being rendered onto the panel.
Usage
To use the World
property, you can access it directly from an instance of ScenePanel
. This property is read-only and provides a reference to the SceneWorld
object.
Example
// Example of accessing the World property
ScenePanel scenePanel = new ScenePanel();
SceneWorld world = scenePanel.World;
// Use the world object to interact with the scene
// For example, adding entities or components to the world
GameObject newObject = new GameObject();
world.Add(newObject);