docs.unity3d.com
    Show / Hide Table of Contents

    Struct ApplicationContext

    The ApplicationContext provides the current context of the application. GetContext(VisualElement) to retrieve the context at a specific place in the visual tree.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.AppUI.Core
    Syntax
    public struct ApplicationContext

    Constructors

    ApplicationContext(ApplicationContext, ContextProvider)

    Construct an ApplicationContext based on an other one, and overrides from a given ContextProvider.

    Declaration
    public ApplicationContext(ApplicationContext context, ContextProvider contextProvider)
    Parameters
    Type Name Description
    ApplicationContext context

    The reference application context.

    ContextProvider contextProvider

    The ContextProvider instance which overrides the reference application context.

    ApplicationContext(Panel)

    Construct an ApplicationContext based on an Panel instance.

    Declaration
    public ApplicationContext(Panel app)
    Parameters
    Type Name Description
    Panel app

    The application instance.

    Properties

    closestProvider

    The closest ContextProvider instance which overrides the current context.

    Declaration
    public readonly ContextProvider closestProvider { get; }
    Property Value
    Type Description
    ContextProvider

    lang

    The current language. This parameter is only used if the Unity Localization package is installed and set up correctly.

    Declaration
    public readonly string lang { get; }
    Property Value
    Type Description
    String

    panel

    The application instance which wraps the whole UI. You must have a single Panel instance inside your runtime app.

    Declaration
    public readonly Panel panel { get; }
    Property Value
    Type Description
    Panel

    preferredTooltipPlacement

    The preferred placement of the tooltip.

    Declaration
    public readonly PopoverPlacement? preferredTooltipPlacement { get; }
    Property Value
    Type Description
    Nullable<PopoverPlacement>

    scale

    The current scale of the UI. Possible values are "medium" or "large".

    Declaration
    public readonly string scale { get; }
    Property Value
    Type Description
    String

    theme

    The current theme of the UI. Possible values are "dark" or "light".

    Declaration
    public readonly string theme { get; }
    Property Value
    Type Description
    String

    tooltipDelayMs

    The delay before the tooltip is displayed.

    Declaration
    public readonly int? tooltipDelayMs { get; }
    Property Value
    Type Description
    Nullable<Int32>
    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