Version: 2020.1
LanguageEnglish
  • C#

HelpBox Constructor

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public HelpBox();
public HelpBox(string text, UIElements.HelpBoxMessageType messageType);

Parameters

text The message text.
messageType The type of message.

Description

Creates a new HelpBox.

using UnityEditor;
using UnityEditor.UIElements;
using UnityEngine.UIElements;

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)); } }

Did you find this page useful? Please give it a rating: