Debug.Log Extensions
Documentation (1.1.9)

◆ DisplayButton() [2/2]

static void Debug.DisplayButton ( string  label,
[NotNull] Action  onClicked 
)
static

Start displaying a button on screen which calls a method when clicked.

Button will continue to be displayed until CancelDisplayButton(string) is called with the same label.

void OnEnable()
{
Debug.DisplayButton("Say Hello", ()=>Debug.Log("Hello!"));
}
void OnDisable()
{
Debug.CancelDisplayButton("Say Hello");
}
static void Log([CanBeNull]object message)
Logs a message to the Console.
Definition: Debug.cs:168
static void DisplayButton([NotNull]Expression< Action > onClicked)
Start displaying a button on screen which calls a method when clicked.
Definition: Debug.cs:4854
static void CancelDisplayButton([NotNull]Expression< Action > onClicked)
Stop displaying a button on screen.
Definition: Debug.cs:4932
Extended version of the built-in Debug class with additional methods to ease debugging while developi...
Definition: Debug.cs:34
Parameters
labelLabel to display on the button.
onClickedMethod to call when the button is clicked.