The Tags
property of a SceneObject
provides access to a collection of tags associated with the scene object. Tags are useful for categorizing or identifying objects within a scene, allowing for easier management and retrieval.
The Tags
property of a SceneObject
provides access to a collection of tags associated with the scene object. Tags are useful for categorizing or identifying objects within a scene, allowing for easier management and retrieval.
Use the Tags
property to add, remove, or check for specific tags on a SceneObject
. This can be particularly useful for filtering objects during scene queries or for applying specific logic to groups of objects based on their tags.
// Example of using the Tags property SceneObject myObject = new SceneObject(); // Add a tag to the SceneObject myObject.Tags.Add("Enemy"); // Check if the SceneObject has a specific tag if (myObject.Tags.Contains("Enemy")) { // Perform actions specific to objects tagged as "Enemy" } // Remove a tag from the SceneObject myObject.Tags.Remove("Enemy");