TagSet RenderExcludeTags { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The RenderExcludeTags property of the CameraComponent class is a collection of tags used to specify which game objects should be excluded from rendering by this camera. By setting tags in this property, you can control which objects are not visible through the camera, allowing for more efficient rendering and scene management.

Usage

To use the RenderExcludeTags property, assign a TagSet containing the tags of the game objects you wish to exclude from rendering. This can be useful for optimizing performance by not rendering objects that are not needed in the current view.

Example

// Example of setting RenderExcludeTags
CameraComponent camera = new CameraComponent();

// Create a new TagSet and add tags to exclude
TagSet excludeTags = new TagSet();
excludeTags.Add("Enemy");
excludeTags.Add("Background");

// Assign the TagSet to the RenderExcludeTags property
camera.RenderExcludeTags = excludeTags;

// Now, any game object with the "Enemy" or "Background" tag will be excluded from rendering by this camera.