Description
The GroupName
property of a PhysicsBody
represents the name assigned to this body within its group. This property is useful for identifying and managing physics bodies that are part of a larger group, allowing for organized handling of multiple physics entities.
Usage
To use the GroupName
property, simply access it from an instance of PhysicsBody
. You can get or set the name of the body within its group as needed.
Example
// Example of setting and getting the GroupName property
PhysicsBody myPhysicsBody = new PhysicsBody();
// Set the group name
myPhysicsBody.GroupName = "PlayerGroup";
// Get the group name
string groupName = myPhysicsBody.GroupName;
// Output the group name
// Note: Use a logging system or UI element to display the group name
// e.g., Log.Info($"Group Name: {groupName}");