Description
The DisplayName
property of the SerializedProperty
class in the Sandbox namespace is a virtual string property. It is used to get or set the display name of a serialized property. This name is typically used in user interfaces to present a more readable or user-friendly name for the property, as opposed to its internal or technical name.
Usage
To use the DisplayName
property, you can access it directly from an instance of a class that inherits from SerializedProperty
. You can both retrieve the current display name and assign a new one if needed.
Example
// Assuming 'property' is an instance of a class derived from SerializedProperty
string currentDisplayName = property.DisplayName;
// Set a new display name
property.DisplayName = "New Display Name";