docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct PositionOptions

    Options to pass as argument to ComputePosition(VisualElement, VisualElement, Panel, PositionOptions) utility method.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.AppUI.UI
    Assembly: Unity.AppUI.dll
    Syntax
    public struct PositionOptions

    Constructors

    PositionOptions(PopoverPlacement, int, int, bool, bool)

    Constructor.

    Declaration
    public PositionOptions(PopoverPlacement preferredPlacement = PopoverPlacement.Top, int offset = 0, int crossOffset = 0, bool shouldFlip = true, bool crossSnap = true)
    Parameters
    Type Name Description
    PopoverPlacement preferredPlacement

    The preferred placement for the popover.

    int offset

    The offset from the anchor element.

    int crossOffset

    The cross offset from the anchor element.

    bool shouldFlip

    Whether the popover should flip if it doesn't fit in the viewport.

    bool crossSnap

    Whether the popover should snap not to go outside the viewport.

    Properties

    crossOffset

    The cross offset from the anchor element.

    Declaration
    public int crossOffset { readonly get; set; }
    Property Value
    Type Description
    int

    crossSnap

    Whether the popover should snap not to go outside the viewport.

    Declaration
    public bool crossSnap { readonly get; set; }
    Property Value
    Type Description
    bool

    favoritePlacement

    The preferred placement for the popover.

    Declaration
    public PopoverPlacement favoritePlacement { readonly get; set; }
    Property Value
    Type Description
    PopoverPlacement

    offset

    The offset from the anchor element.

    Declaration
    public int offset { readonly get; set; }
    Property Value
    Type Description
    int

    shouldFlip

    Whether the popover should flip if it doesn't fit in the viewport.

    Declaration
    public bool shouldFlip { readonly get; set; }
    Property Value
    Type Description
    bool
    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)