TryGetRevertMethodForFieldName(SerializedProperty, out Action<SerializedProperty>)
Extension hook for an optional property revert menu item.
Read time 1 minuteLast updated 13 days ago
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor.CoreModule
TryGetRevertMethodForFieldName(SerializedProperty, Action<SerializedProperty>)
bool TryGetRevertMethodForFieldName(SerializedProperty property, out Action<SerializedProperty> revertMethod)
Parameters
The property that the user is interacting with.
Assign the custom action to be called if the user selects the revert menu command.
Returns
Type | Description |
|---|---|
| bool | True, if the revert menu should be shown for the property. |
Remarks
Called as the context menu is being built to retrieve the method to be called (if any) when the user select the 'revert' menu item. The boolean return value defines if a revert menu item is to be shown.