logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class StubModalComponent

    The Unity-lifetime counterpart of UnityModalServiceTests.StubModal: a modal that can actually be destroyed, which is what a real modal is and what the plain C# stub can never be. Only a UnityEngine.Object reaches the "destroyed but not null" state the close-modal guard exists for, so this is the fixture that pins UnityObjectUtils.IsAlive against a plain == null check. Lives in its own file because Unity binds a MonoBehaviour script by file name.

    Inheritance
    object
    StubModalComponent
    Implements
    IUiModal
    IComponent
    IFoundationSettings
    Namespace: Serenity.UnityModal.Tests.Infrastructure
    Assembly: Tests.dll
    Syntax
    public class StubModalComponent : MonoBehaviour, IUiModal, IComponent, IFoundationSettings

    Constructors

    StubModalComponent()

    Declaration
    public StubModalComponent()

    Properties

    Guid

    Declaration
    public string Guid { get; set; }
    Property Value
    Type Description
    string

    Id

    Declaration
    public string Id { get; set; }
    Property Value
    Type Description
    string

    ModalParameters

    Declaration
    public IUiModalParameters ModalParameters { get; set; }
    Property Value
    Type Description
    IUiModalParameters

    WasAskedToDestroyItself

    Declaration
    public bool WasAskedToDestroyItself { get; }
    Property Value
    Type Description
    bool

    True once the close coroutine asked this modal to destroy itself — the first thing that coroutine does, so a false here proves the handler returned before starting it at all.

    Methods

    DestroyModal()

    Declaration
    public IEnumerator DestroyModal()
    Returns
    Type Description
    IEnumerator

    ExecuteChangeOptionValue(UiOptionValue)

    Declaration
    public void ExecuteChangeOptionValue(UiOptionValue optionValue)
    Parameters
    Type Name Description
    UiOptionValue optionValue

    ExecuteSelectOption()

    Declaration
    public void ExecuteSelectOption()

    GetOptionByIndex(int)

    Declaration
    public IUiInteractable GetOptionByIndex(int index)
    Parameters
    Type Name Description
    int index
    Returns
    Type Description
    IUiInteractable

    GetSelectedOption()

    Declaration
    public IUiInteractable GetSelectedOption()
    Returns
    Type Description
    IUiInteractable

    GetSelectedOptionIndex()

    Declaration
    public int GetSelectedOptionIndex()
    Returns
    Type Description
    int

    OnDraggingEnd()

    Declaration
    public void OnDraggingEnd()

    OnDraggingStart()

    Declaration
    public void OnDraggingStart()

    SelectNextOption()

    Declaration
    public void SelectNextOption()

    SelectPreviousOption()

    Declaration
    public void SelectPreviousOption()

    SetNextOptionValue()

    Declaration
    public void SetNextOptionValue()

    SetPreviousOptionValue()

    Declaration
    public void SetPreviousOptionValue()

    Implements

    IUiModal
    IComponent
    IFoundationSettings
    In this article
    © 2026 Serenity. All Rights Reserved