Class HelpBox
Makes a help box with a message to the user.
Inherited Members
Namespace: UnityEngine.UIElements
Syntax
public class HelpBox : VisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle
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));
}
}
Constructors
HelpBox()
Creates a new HelpBox.
Declaration
public HelpBox()
HelpBox(String, HelpBoxMessageType)
Creates a new HelpBox.
Declaration
public HelpBox(string text, HelpBoxMessageType messageType)
Parameters
Type | Name | Description |
---|---|---|
String | text | The message text. |
HelpBoxMessageType | messageType | The type of message. |
Fields
iconErrorUssClassName
The USS class name for the Error state in Elements of this type.
Declaration
public static readonly string iconErrorUssClassName
Field Value
Type | Description |
---|---|
String |
iconInfoUssClassName
The USS class name for the Info state in Elements of this type.
Declaration
public static readonly string iconInfoUssClassName
Field Value
Type | Description |
---|---|
String |
iconUssClassName
The USS class name for images in Elements of this type.
Declaration
public static readonly string iconUssClassName
Field Value
Type | Description |
---|---|
String |
iconwarningUssClassName
The USS class name for the Warning state in Elements of this type.
Declaration
public static readonly string iconwarningUssClassName
Field Value
Type | Description |
---|---|
String |
labelUssClassName
The USS class name for labels in Elements of this type.
Declaration
public static readonly string labelUssClassName
Field Value
Type | Description |
---|---|
String |
ussClassName
The USS class name for Elements of this type.
Declaration
public static readonly string ussClassName
Field Value
Type | Description |
---|---|
String |
Properties
messageType
The type of message.
Declaration
public HelpBoxMessageType messageType { get; set; }
Property Value
Type | Description |
---|---|
HelpBoxMessageType |
text
The message text.
Declaration
public string text { get; set; }
Property Value
Type | Description |
---|---|
String |