logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    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
    object
    LayoutSizeDrawer
    Namespace: Serenity.Ui.Infrastructure.Editor
    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
    Type Description
    float

    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
    In this article
    © 2026 Serenity. All Rights Reserved