The RenderTags
property of the CameraComponent
class is a collection of tags that determine which game objects are included in the rendering process of the camera. If no tags are specified, the camera will render all objects in the scene.
The RenderTags
property of the CameraComponent
class is a collection of tags that determine which game objects are included in the rendering process of the camera. If no tags are specified, the camera will render all objects in the scene.
To use the RenderTags
property, assign a TagSet
containing the desired tags to the property. This will filter the objects rendered by the camera to only those with matching tags.
// Example of setting RenderTags for a CameraComponent CameraComponent camera = new CameraComponent(); // Create a new TagSet and add tags TagSet tags = new TagSet(); tags.Add("Player"); tags.Add("Enemy"); // Assign the TagSet to the RenderTags property camera.RenderTags = tags; // Now the camera will only render objects tagged with "Player" or "Enemy".