The Worlds
property of the SceneCamera
class allows you to specify multiple SceneWorld
instances that the camera can render. This is useful when you want a single camera to render content from different worlds simultaneously.
The Worlds
property of the SceneCamera
class allows you to specify multiple SceneWorld
instances that the camera can render. This is useful when you want a single camera to render content from different worlds simultaneously.
To use the Worlds
property, you can add or remove SceneWorld
instances to the HashSet
to control which worlds the camera should render. This property is particularly useful in scenarios where you need to render multiple scenes or layers within the same camera view.
// Create a new SceneCamera instance SceneCamera camera = new SceneCamera(); // Create new SceneWorld instances SceneWorld world1 = new SceneWorld(); SceneWorld world2 = new SceneWorld(); // Add worlds to the camera's Worlds property camera.Worlds.Add(world1); camera.Worlds.Add(world2); // Now the camera will render both world1 and world2