Description
The RenderTags
property of the SceneCamera
class specifies which scene objects should be rendered by the camera based on their tags. Only objects that have at least one of the specified tags in this set will be rendered. This allows for selective rendering of objects in the scene, which can be useful for optimizing performance or creating specific visual effects.
Usage
To use the RenderTags
property, you can assign it a set of tags that you want the camera to render. Any scene object that has one of these tags will be included in the camera's rendering process.
Example usage:
SceneCamera camera = new SceneCamera();
ITagSet renderTags = new TagSet();
renderTags.Add("Player");
renderTags.Add("Enemy");
camera.RenderTags = renderTags;
In this example, the camera will only render objects tagged with "Player" or "Enemy".
Example
SceneCamera camera = new SceneCamera();
ITagSet renderTags = new TagSet();
renderTags.Add("Player");
renderTags.Add("Enemy");
camera.RenderTags = renderTags;