Description
The Tags
property provides an enumerable collection of all tags that have an entry in either the Defaults
or Pairs
properties of the CollisionRules
class. This property is useful for retrieving a list of all defined collision tags that are used in the physics collision rules.
Usage
To access the Tags
property, you need to have an instance of the CollisionRules
class. You can then iterate over the collection to get each tag as a string.
Example
// Assuming 'collisionRules' is an instance of CollisionRules
foreach (string tag in collisionRules.Tags)
{
// Process each tag
Console.WriteLine(tag);
}