Class ScriptableObjectSettingsGUILayout
Utility class that provides GUILayout controls for displaying and resetting SerializedProperty fields in the Unity Editor.
public class ScriptableObjectSettingsGUILayout
Inheritance
Methods
PropertyFieldWithReset<T>(SerializedProperty, T)
Displays a property field with a reset button. The button resets the property to its default value.
public static void PropertyFieldWithReset<T>(SerializedProperty property, T defaultValue)
Parameters
| Name | Type | Description |
|---|---|---|
property | SerializedProperty | The SerializedProperty to display. |
defaultValue | T | The default value to reset the property to. |
Type Parameters
| Name | Type | Description |
|---|---|---|
T | The type of the property value. |
PropertyFieldWithReset<T>(SerializedProperty, GUIContent, T)
Displays a property field with a label and a reset button. The button resets the property to its default value.
public static void PropertyFieldWithReset<T>(SerializedProperty property, GUIContent label, T defaultValue)
Parameters
| Name | Type | Description |
|---|---|---|
property | SerializedProperty | The SerializedProperty to display. |
label | GUIContent | The label for the property. |
defaultValue | T | The default value to reset the property to. |
Type Parameters
| Name | Type | Description |
|---|---|---|
T | The type of the property value. |