Description
The World
property of the ScenePanel
class provides a shortcut to the Camera.World
. It represents the SceneWorld
that is being rendered by the panel. This property is useful for accessing the scene world directly from the panel without needing to go through the camera.
Usage
To use the World
property, you can access it directly from an instance of ScenePanel
. This allows you to interact with the scene world that the panel is rendering.
Example
// Example of accessing the World property from a ScenePanel instance
ScenePanel myScenePanel = new ScenePanel();
SceneWorld currentWorld = myScenePanel.World;
// You can now interact with the currentWorld as needed
// For example, adding entities or modifying the scene
currentWorld.AddEntity(new MyEntity());