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
- Type: Class
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
- Inherits from: VisualElement
- Implements: IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle
[Icon("UIToolkit/Icons/HelpBox.png")]public class HelpBox : VisualElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle
Remarks

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 |
|---|---|
| bottomContainerUssClassName | The USS class name for the bottom content container of this Elements type. |
| buttonUssClassName | The USS class name for the action button of this Elements type. |
| iconErrorUssClassName | The USS class name for the HelpBoxMessageType.Error state in Elements of this type. |
| iconInfoUssClassName | The USS class name for the HelpBoxMessageType.Info state in Elements of this type. |
| iconUssClassName | The USS class name for images in Elements of this type. |
| iconWarningUssClassName | The USS class name for the HelpBoxMessageType.Warning state in Elements of this type. |
| labelUssClassName | The USS class name for labels in Elements of this type. |
| linkUssClassName | The USS class name for the action link for this Elements type. |
| topContainerUssClassName | The USS class name for the top content container of this Elements type. |
| ussClassName | The 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 |
|---|---|
| buttonText | The action button's text value. |
| linkHref | The hyperlink's reference value. |
| linkText | The hyperlink's text value. |
| messageType | The type of message. |
| text | The message text. |
Events
Member | Description |
|---|---|
| onButtonClicked | Callback triggered when the action button is clicked. |