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.
Use the RenderTags
property to filter which game objects should be rendered by the camera based on their tags. This can be useful for optimizing rendering performance by excluding unnecessary objects or for creating specific visual effects by only rendering certain objects.
// Example of setting RenderTags for a CameraComponent CameraComponent camera = new CameraComponent(); // Add tags to include specific objects in the rendering camera.RenderTags.Add("Player"); camera.RenderTags.Add("Enemy"); // This camera will now only render objects tagged with "Player" or "Enemy".