Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


HelpBox

Makes a help box with a message to the user. For more information, refer to UXML element HelpBox.
Read time 8 minutesLast updated 5 days ago

Definition

[Icon("UIToolkit/Icons/HelpBox.png")]public class HelpBox : VisualElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle

Remarks

UIElementsHelpBox (HelpBox)

Examples

public class HelpBoxExample : EditorWindow{ [MenuItem("Example/Help Box")] static void ShowWindow() { HelpBoxExample window = (HelpBoxExample)EditorWindow.GetWindow(typeof(HelpBoxExample)); window.Show(); } void OnEnable() { rootVisualElement.Add(new HelpBox("This is a help box", HelpBoxMessageType.Info)); }}

Static Fields

Value

Description

bottomContainerUssClassNameThe USS class name for the bottom content container of this Elements type.
buttonUssClassNameThe USS class name for the action button of this Elements type.
iconErrorUssClassNameThe USS class name for the HelpBoxMessageType.Error state in Elements of this type.
iconInfoUssClassNameThe USS class name for the HelpBoxMessageType.Info state in Elements of this type.
iconUssClassNameThe USS class name for images in Elements of this type.
iconWarningUssClassNameThe USS class name for the HelpBoxMessageType.Warning state in Elements of this type.
labelUssClassNameThe USS class name for labels in Elements of this type.
linkUssClassNameThe USS class name for the action link for this Elements type.
topContainerUssClassNameThe USS class name for the top content container of this Elements type.
ussClassNameThe USS class name for Elements of this type.

Constructors

Constructor

Description

HelpBox()Creates a new HelpBox.
HelpBox(System.String,UnityEngine.UIElements.HelpBoxMessageType)Creates a new HelpBox.

Properties

Property

Description

buttonTextThe action button's text value.
linkHrefThe hyperlink's reference value.
linkTextThe hyperlink's text value.
messageTypeThe type of message.
textThe message text.

Events

Member

Description

onButtonClickedCallback triggered when the action button is clicked.

Inheritance

Inherited Members