Class LayoutSizeDrawer
Inspector drawer for LayoutSize. Instead of a raw enum + number (or a free text box),
it shows a friendly unit dropdown (fit content / px / fr / %), a value field that only appears when a
value is needed, and a plain-English hint of what the unit does. Expand the row to set optional
min/max pixel clamps. This keeps "how much space does this region take" approachable
for non-developers while mapping 1:1 to the runtime model.
Inheritance
LayoutSizeDrawer
Assembly: Serenity.UnityUi.Infrastructure.Editor.dll
Syntax
public class LayoutSizeDrawer : PropertyDrawer
Constructors
LayoutSizeDrawer()
Declaration
public LayoutSizeDrawer()
Methods
GetPropertyHeight(SerializedProperty, GUIContent)
Declaration
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
Parameters
| Type |
Name |
Description |
| SerializedProperty |
property |
|
| GUIContent |
label |
|
Returns
OnGUI(Rect, SerializedProperty, GUIContent)
Declaration
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
Parameters
| Type |
Name |
Description |
| Rect |
position |
|
| SerializedProperty |
property |
|
| GUIContent |
label |
|