ITagSet Tags { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

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 of objects based on their tags.

Usage

Use the Tags property to add, remove, or check for specific tags on a SceneObject. This can be particularly useful for organizing objects within a scene or for implementing logic that depends on object categorization.

Example

// Example of using the Tags property
SceneObject myObject = new SceneObject();

// Add a tag to the scene object
myObject.Tags.Add("Enemy");

// Check if the object has a specific tag
if (myObject.Tags.Contains("Enemy"))
{
    // Perform actions specific to objects tagged as "Enemy"
}

// Remove a tag from the scene object
myObject.Tags.Remove("Enemy");