docs.unity3d.com
    Show / Hide Table of Contents

    Class Modal

    The Modal Popup class.

    Inheritance
    Object
    Popup
    Popup<Modal>
    Modal
    Inherited Members
    Popup<Modal>.m_LastFocusedElement
    Popup<Modal>.shown
    Popup<Modal>.dismissed
    Popup<Modal>.SetKeyboardDismiss(Boolean)
    Popup<Modal>.SetLastFocusedElement(Focusable)
    Popup<Modal>.InvokeShownEventHandlers()
    Popup<Modal>.InvokeDismissedEventHandlers(DismissType)
    Popup.k_NextFrameDurationMs
    Popup.k_PopupShow
    Popup.k_PopupDismiss
    Popup.handler
    Popup.keyboardDismissEnabled
    Popup.view
    Popup.targetParent
    Popup.contentView
    Popup.context
    Popup.Dismiss()
    Popup.Dismiss(DismissType)
    Popup.ShouldDismiss(DismissType)
    Popup.Show()
    Popup.ShowView()
    Popup.ShouldAnimate()
    Popup.OnViewKeyDown(KeyDownEvent)
    Popup.AnimateViewIn()
    Popup.HideView(DismissType)
    Popup.AnimateViewOut(DismissType)
    Popup.FindSuitableParent(VisualElement)
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.AppUI.UI
    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.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023