HelpBox
Makes a help box with a message to the user. For more information, refer to UXML element HelpBox.
Read time 6 minutesLast updated 4 days ago
Definition
- Type: Class
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
- Inherits from: VisualElement
- Implements: IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler
public class HelpBox : VisualElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler
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 |
|---|---|
| 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. |
| 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 |
|---|---|
| messageType | The type of message. |
| text | The message text. |