docs.unity3d.com
    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.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.AppUI.UI
    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.

    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