bool AddTag( string tag )

robot_2Generated
code_blocksInput

Description

The AddTag method is used to add a tag to a PhysicsShape object. Tags can be used to categorize or identify shapes for various purposes, such as filtering or grouping. However, this method is marked as obsolete, and it is recommended to use the Tags property instead.

Usage

To add a tag to a PhysicsShape, call the AddTag method with the desired tag name as a string parameter. Note that this method is obsolete, and you should consider using the Tags property for managing tags.

Example

// Example of using AddTag (obsolete)
PhysicsShape shape = new PhysicsShape();
bool success = shape.AddTag("exampleTag");

// Recommended approach using Tags property
shape.Tags.Add("exampleTag");