logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UiOptionListInspectorGUI

    Reusable inspector widget that renders a reorderable list of UiOption exactly the way the menu settings editor does (ValueType / UI Element / Id / Label / Value / Translate Label columns plus a list of OnSubmit signals), so the menu editor AND the modal editor share one rendering. The host editor supplies the serialized options array, the owning view id (used to stamp option ViewIds and generate unique ids), and a repaint callback; everything else -- game-settings id dropdowns, TRANSITION/ACTION value pickers, the OnSubmit signal list, add/remove -- is handled here.

    Inheritance
    object
    UiOptionListInspectorGUI
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Menu.Infrastructure.Settings.Editor
    Assembly: Serenity.UnityMenu.Infrastructure.Editor.dll
    Syntax
    public class UiOptionListInspectorGUI

    Constructors

    UiOptionListInspectorGUI(SerializedObject, SerializedProperty, Object, Func<string>, Func<UiOption[]>, Func<IReadOnlyList<MenuTransitionTargetCandidate>>, Action)

    Creates the shared options-list widget.

    Declaration
    public UiOptionListInspectorGUI(SerializedObject serializedObject, SerializedProperty optionsArrayProperty, Object target, Func<string> getViewId, Func<UiOption[]> getOptions, Func<IReadOnlyList<MenuTransitionTargetCandidate>> getTransitionTargets, Action repaint)
    Parameters
    Type Name Description
    SerializedObject serializedObject

    The host editor's serialized object.

    SerializedProperty optionsArrayProperty

    The serialized UiOption array property to edit (may be nested).

    Object target

    The asset being edited, for Undo and dirty marking.

    Func<string> getViewId

    Returns the owning view id (menu/modal id) used to stamp ViewIds and generate option ids.

    Func<UiOption[]> getOptions

    Returns the live options array, used only to generate collision-free new ids.

    Func<IReadOnlyList<MenuTransitionTargetCandidate>> getTransitionTargets

    Returns what a TRANSITION option's Value dropdown may offer. An asset inspector passes ProjectTargets(); the Menu Manager wizard passes a list that also carries the run's other drafts, which exist on no disk yet. Null falls back to ProjectTargets() rather than to nothing, so the dropdown always offers at least the go-back sentinel.

    Action repaint

    The host editor's Repaint callback.

    Methods

    DoLayoutList()

    Renders the options label, the reorderable list, and a Clear Options button.

    Declaration
    public void DoLayoutList()
    In this article
    © 2026 Serenity. All Rights Reserved