Skip to main content

Class HelpBoxAttribute

Attribute to display a help box in the Unity Inspector.

public class HelpBoxAttribute : PropertyAttribute

Inheritance​

object→Attribute→PropertyAttribute→HelpBoxAttribute

Remarks​

Can be used to add notes, warnings, or tips directly above a property.

Constructors​

HelpBoxAttribute(string, HelpBoxMessageType)​

Creates a new HelpBoxAttribute with a message and optional message type.

public HelpBoxAttribute(string message, HelpBoxMessageType messageType = HelpBoxMessageType.Info)

Parameters​

NameTypeDescription
messagestringThe text to display in the help box.
messageTypeHelpBoxMessageTypeThe message type (defaults to Info).

Properties​

Message​

The message to display inside the help box.

public string Message { get; }

Property Value​

string

MessageType​

The type of message (Info, Warning, or Error).

public HelpBoxMessageType MessageType { get; }

Property Value​

HelpBoxMessageType