docs.unity3d.com
    Show / Hide Table of Contents

    Class TooltipContent

    An extended tooltip for use in MenuAction.

    Inheritance
    Object
    TooltipContent
    Namespace: UnityEditor.ProBuilder
    Syntax
    [Serializable]
    public sealed class TooltipContent : IEquatable<TooltipContent>

    Constructors

    TooltipContent(String, String, Char[])

    Create a new tooltip.

    Declaration
    public TooltipContent(string title, string summary, params char[] shortcut)
    Parameters
    Type Name Description
    String title

    The header text for this tooltip.

    String summary

    The body of the tooltip text. This should be kept brief.

    Char[] shortcut

    A set of keys to be displayed as the shortcut for this action.

    TooltipContent(String, String, String)

    Create a new tooltip.

    Declaration
    public TooltipContent(string title, string summary, string shortcut = "")
    Parameters
    Type Name Description
    String title

    The header text for this tooltip.

    String summary

    The body of the tooltip text. This should be kept brief.

    String shortcut

    A set of keys to be displayed as the shortcut for this action.

    Properties

    shortcut

    The shortcut assigned to this menu item.

    Declaration
    public string shortcut { get; set; }
    Property Value
    Type Description
    String

    A text representation of the optional shortcut.

    summary

    A brief summary of what this menu action does.

    Declaration
    public string summary { get; set; }
    Property Value
    Type Description
    String

    The body of the summary text.

    title

    The title to show in the tooltip window.

    Declaration
    public string title { get; set; }
    Property Value
    Type Description
    String

    The header text for this tooltip.

    Methods

    Equals(Object)

    Equality check is performed by comparing the title property of each tooltip.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj

    The ToolTip content to compare.

    Returns
    Type Description
    Boolean

    True if title is the same, false otherwise.

    Overrides
    Object.Equals(Object)

    Equals(TooltipContent)

    Equality check is performed by comparing the title property of each tooltip.

    Declaration
    public bool Equals(TooltipContent other)
    Parameters
    Type Name Description
    TooltipContent other

    The ToolTip content to compare.

    Returns
    Type Description
    Boolean

    True if title is the same, false otherwise.

    FromString(String)

    Create a new tooltip with title.

    Declaration
    public static TooltipContent FromString(string title)
    Parameters
    Type Name Description
    String title

    The title to apply to the new Tooltip.

    Returns
    Type Description
    TooltipContent

    A new Tooltip with title and no content.

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32
    Overrides
    Object.GetHashCode()

    ToString()

    Convert a Tooltip to a string.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    The title of the Tooltip.

    Overrides
    Object.ToString()

    Operators

    Explicit(String to TooltipContent)

    Create a Tooltip with a title.

    Declaration
    public static explicit operator TooltipContent(string title)
    Parameters
    Type Name Description
    String title

    The title to apply to the new Tooltip.

    Returns
    Type Description
    TooltipContent

    A new Tooltip with title and no content.

    Explicit(TooltipContent to String)

    Convert a tooltip to a string.

    Declaration
    public static explicit operator string (TooltipContent content)
    Parameters
    Type Name Description
    TooltipContent content

    The Tooltip to convert.

    Returns
    Type Description
    String

    The title of content.

    Exceptions
    Type Condition
    ArgumentNullException

    content is null.

    Back to top
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)