GetLabelElement Method

GetLabelElement(PropertyField)

Gets the main label element of a PropertyField when using a default property drawer. It should be called after the PropertyField has been processed by Unity's binding system.

Declaration
public static Label GetLabelElement(this PropertyField propertyField)
Parameters
PropertyField propertyField

The property field to search for a main Label Element.

Returns
Label

The main Label Element, or null if it isn't found.

Remarks

This can be useful to set the label's tooltip, or to change its text. Custom PropertyDrawers aren't really supported; usually, they can take care of their own labels.