docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Modal

    The Modal Popup class.

    Inheritance
    object
    Popup
    Popup<Modal>
    Modal
    Inherited Members
    Popup<Modal>.shown
    Popup<Modal>.dismissed
    Popup<Modal>.SetKeyboardDismiss(bool)
    Popup<Modal>.SetLastFocusedElement(Focusable)
    Popup.keyboardDismissEnabled
    Popup.view
    Popup.targetParent
    Popup.contentView
    Popup.Dismiss()
    Popup.Dismiss(DismissType)
    Popup.Show()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.AppUI.UI
    Assembly: Unity.AppUI.dll
    Syntax
    public sealed class Modal : Popup<Modal>

    Properties

    fullscreenMode

    Set the fullscreen mode for this Modal.

    See ModalFullScreenMode values for more info.

    Declaration
    public ModalFullScreenMode fullscreenMode { get; set; }
    Property Value
    Type Description
    ModalFullScreenMode

    Methods

    Build(VisualElement, VisualElement)

    Build a new Modal component.

    Declaration
    public static Modal Build(VisualElement referenceView, VisualElement content)
    Parameters
    Type Name Description
    VisualElement referenceView

    An arbitrary UI element inside the UI panel.

    VisualElement content

    The VisualElement UI element to display inside this Modal.

    Returns
    Type Description
    Modal

    The Modal instance.

    GetFocusableElement()

    Returns the element that will be focused when the view will become visible.

    The default value is `null`.

    Declaration
    protected override VisualElement GetFocusableElement()
    Returns
    Type Description
    VisualElement

    The element that will be focused when the view will become visible.

    Overrides
    Popup.GetFocusableElement()

    SetFullScreenMode(ModalFullScreenMode)

    Set a new value for fullscreenMode property.

    Declaration
    public Modal SetFullScreenMode(ModalFullScreenMode mode)
    Parameters
    Type Name Description
    ModalFullScreenMode mode

    The new value.

    Returns
    Type Description
    Modal

    The Modal object.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)