The ControlWidget class in the Editor
namespace is an abstract class used to edit the value of a single SerializedProperty
. It provides a framework for creating custom editor controls within the s&box editor environment.
The ControlWidget class in the Editor
namespace is an abstract class used to edit the value of a single SerializedProperty
. It provides a framework for creating custom editor controls within the s&box editor environment.
Member Name | Summary |
---|---|
Create | Creates a new instance of a ControlWidget for a given SerializedProperty. |
TryCreateGenericObjectControlWidget | Attempts to create a generic object control widget for a given SerializedProperty. |
ControlRadius | Defines the radius of the control. |
ControlColor | Specifies the default color of the control. |
ControlRowHeight | Specifies the height of the control row. |
ControlHighlightPrimary | Specifies the primary highlight color of the control. |
ControlHighlightSecondary | Specifies the secondary highlight color of the control. |
Member Name | Summary |
---|---|
StartEditing | Selects this widget and starts editing. |
Think | Performs per-frame logic for the widget. |
Prime | Should get called right after creation. |
ToClipboardString | Converts the widget's state to a string suitable for clipboard operations. |
FromClipboardString | Restores the widget's state from a clipboard string. |
SerializedProperty | Gets or sets the SerializedProperty associated with this widget. |
CellAlignment | If none, when in a grid, the control will fill the entire cell. |
IsWideMode | If true, the control prefers to be full inspector width with the label above it. |
IncludeLabel | If true (default), a label is included next to the control. |
IsControlActive | Indicates whether the control is currently active. |
IsControlHovered | Indicates whether the control is currently hovered. |
IsControlDisabled | Indicates whether the control is currently disabled. |
IsControlButton | Indicates whether the control functions as a button. |
Tint | Gets or sets the tint color of the control. |
SupportsMultiEdit | Indicates whether the control supports multi-editing. |
PaintBackground | Indicates whether the control should paint its background. |