string GroupName { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The GroupName property of the SerializedProperty class is a virtual string property that allows you to get or set the name of the group to which the serialized property belongs. This can be useful for organizing properties into logical groups, especially when displaying them in an inspector or editor interface.

Usage

To use the GroupName property, you can simply access it through an instance of the SerializedProperty class. You can read the current group name or assign a new group name to organize properties as needed.

Example

// Example of using the GroupName property

// Assume 'property' is an instance of SerializedProperty
string currentGroupName = property.GroupName;

// Set a new group name
property.GroupName = "Physics Properties";

// Check the updated group name
Console.WriteLine(property.GroupName); // Output: Physics Properties