Skip to main content

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​

NameTypeDescription
propertySerializedPropertyThe SerializedProperty to display.
defaultValueTThe default value to reset the property to.

Type Parameters​

NameTypeDescription
TThe 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​

NameTypeDescription
propertySerializedPropertyThe SerializedProperty to display.
labelGUIContentThe label for the property.
defaultValueTThe default value to reset the property to.

Type Parameters​

NameTypeDescription
TThe type of the property value.
  • Methods
    • PropertyFieldWithReset<T>(SerializedProperty, T)
    • PropertyFieldWithReset<T>(SerializedProperty, GUIContent, T)