docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class AnchorPopupUtils

    Utility class to compute the position of a popup based on the anchor's position and size.

    Inheritance
    object
    AnchorPopupUtils
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.AppUI.UI
    Assembly: Unity.AppUI.dll
    Syntax
    public static class AnchorPopupUtils

    Methods

    ComputePosition(VisualElement, VisualElement, Panel, PositionOptions)

    This method will return the possible position of UI element based on a specific context.

    Declaration
    public static PositionResult ComputePosition(VisualElement element, VisualElement anchor, Panel panel, PositionOptions options)
    Parameters
    Type Name Description
    VisualElement element

    The element which needs to be positioned

    VisualElement anchor

    The element used as an anchor for the element.

    Panel panel

    The panel containing elements.

    PositionOptions options

    The options used to compute the position.

    Returns
    Type Description
    PositionResult

    The computed position.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    The provided favoritePlacement value is invalid.

    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)