TagSet RenderExcludeTags { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The RenderExcludeTags property of the CameraComponent class is a TagSet that specifies a list of tags used to exclude certain game objects from being rendered by this camera. When rendering, the camera will check the tags of each game object against this list, and any object with a matching tag will be excluded from the render process.

Usage

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

Example

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

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

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

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