HelpBox

  06. Attributes No Comments

When added before a class member causes a help box to be shown above the control of the class member it in the inspector.

It is also possible to only show the help box when a specified predicate is true.

Attribute Target

Field, property, method or indexer.

Example

using UnityEngine;
using Sisus.Attributes;

public class HelpPuzzleBox : MonoBehaviour
{
	[ShowInInspector, HelpBox("Can you make all help boxes disappear?", "!a && !e", HelpBoxMessageType.Warning)]
	private bool a;
	[ShowInInspector, HelpBox("Can you make all help boxes disappear?", "a && !b && !e", HelpBoxMessageType.Warning)]
	private bool b;
	[ShowInInspector, HelpBox("Can you make all help boxes disappear?", "b && !c && !e", HelpBoxMessageType.Warning)]
	private bool c;
	[ShowInInspector, HelpBox("Can you make all help boxes disappear?", "c && !d && !e", HelpBoxMessageType.Warning)]
	private bool d;
	[ShowInInspector, HelpBox("Can you make all help boxes disappear?", "d && !e", HelpBoxMessageType.Warning)]
	private bool e;
}

Example Result