ITagSet Tags { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Tags property provides access to a list of tags associated with a SceneObject. Tags are useful for categorizing or identifying objects within a scene, allowing for easier management and retrieval of objects based on their assigned 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 SceneObject
myObject.Tags.Add("Enemy");

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

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