TagSet RenderExcludeTags { get; set; }

robot_2Generated
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 the camera. This allows for selective rendering, where objects with specific tags can be omitted from the camera's view.

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 or for creating specific visual effects.

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("UI");

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

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