docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Tooltip

    The tooltip popup type.

    Inheritance
    object
    Popup
    Popup<Tooltip>
    AnchorPopup<Tooltip>
    Tooltip
    Inherited Members
    AnchorPopup<Tooltip>.placement
    AnchorPopup<Tooltip>.currentPlacement
    AnchorPopup<Tooltip>.offset
    AnchorPopup<Tooltip>.crossOffset
    AnchorPopup<Tooltip>.containerPadding
    AnchorPopup<Tooltip>.shouldFlip
    AnchorPopup<Tooltip>.arrowVisible
    AnchorPopup<Tooltip>.outsideClickDismissEnabled
    AnchorPopup<Tooltip>.outsideScrollEnabled
    AnchorPopup<Tooltip>.outsideClickStrategy
    AnchorPopup<Tooltip>.anchor
    AnchorPopup<Tooltip>.SetPlacement(PopoverPlacement)
    AnchorPopup<Tooltip>.SetOffset(int)
    AnchorPopup<Tooltip>.SetCrossOffset(int)
    AnchorPopup<Tooltip>.SetContainerPadding(int)
    AnchorPopup<Tooltip>.SetShouldFlip(bool)
    AnchorPopup<Tooltip>.SetArrowVisible(bool)
    AnchorPopup<Tooltip>.SetAnchor(VisualElement)
    AnchorPopup<Tooltip>.SetOutsideClickDismiss(bool)
    AnchorPopup<Tooltip>.SetOutsideScrollEnabled(bool)
    AnchorPopup<Tooltip>.SetOutsideClickStrategy(OutsideClickStrategy)
    Popup<Tooltip>.shown
    Popup<Tooltip>.dismissed
    Popup<Tooltip>.SetKeyboardDismiss(bool)
    Popup<Tooltip>.SetLastFocusedElement(Focusable)
    Popup.keyboardDismissEnabled
    Popup.view
    Popup.targetParent
    Popup.contentView
    Popup.Dismiss()
    Popup.Dismiss(DismissType)
    Popup.Show()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.AppUI.UI
    Assembly: Unity.AppUI.dll
    Syntax
    public sealed class Tooltip : AnchorPopup<Tooltip>

    Fields

    defaultPlacement

    The default placement of the tooltip.

    Declaration
    public const PopoverPlacement defaultPlacement = Bottom
    Field Value
    Type Description
    PopoverPlacement

    Properties

    template

    The template to display inside the popup.

    Declaration
    public VisualElement template { get; }
    Property Value
    Type Description
    VisualElement

    text

    The text to display inside the popup.

    Declaration
    public string text { get; }
    Property Value
    Type Description
    string

    Methods

    AnimateViewIn()

    Start the animation for this popup.

    Declaration
    protected override void AnimateViewIn()
    Overrides
    AnchorPopup<Tooltip>.AnimateViewIn()

    AnimateViewOut(DismissType)

    Start the hide animation for this popup.

    Declaration
    protected override void AnimateViewOut(DismissType reason)
    Parameters
    Type Name Description
    DismissType reason
    Overrides
    AnchorPopup<Tooltip>.AnimateViewOut(DismissType)

    Build(VisualElement)

    Build a new Tooltip. In the Application element, only one Tooltip is create and moved at the right place when hovering others UI elements. The Tooltip is handled by the TooltipManipulator.

    Declaration
    public static Tooltip Build(VisualElement referenceView)
    Parameters
    Type Name Description
    VisualElement referenceView

    An arbitrary UI element used as reference for the application context to attach to the popup.

    Returns
    Type Description
    Tooltip

    A Tooltip instance.

    FindSuitableParent(VisualElement)

    Find the parent VisualElement where the popup will be added. This is usually one of the layers from the Panel root UI element.

    Declaration
    protected override VisualElement FindSuitableParent(VisualElement element)
    Parameters
    Type Name Description
    VisualElement element

    An arbitrary UI element inside the panel.

    Returns
    Type Description
    VisualElement

    The popup container VisualElement in the current panel.

    Overrides
    Popup.FindSuitableParent(VisualElement)

    SetContent(VisualElement)

    Set the content of the tooltip.

    Declaration
    public Tooltip SetContent(VisualElement content)
    Parameters
    Type Name Description
    VisualElement content

    The content to display inside the tooltip.

    Returns
    Type Description
    Tooltip

    The Tooltip.

    Remarks

    Passing null will clear the content of the tooltip.

    SetText(string)

    Set a new value for the text property.

    Declaration
    public Tooltip SetText(string value)
    Parameters
    Type Name Description
    string value

    The new value (will be localized).

    Returns
    Type Description
    Tooltip

    The Tooltip.

    ShouldAnimate()

    Implement this method to know if the popup should call AnimateViewIn() and AnimateViewOut(DismissType) methods or not.

    Declaration
    protected override bool ShouldAnimate()
    Returns
    Type Description
    bool

    True if you want to animate the popup, False otherwise.

    Overrides
    Popup.ShouldAnimate()
    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)