Attributes

Table of Content

Table of Content

Table of Content

Button

Create a button at the bottom of the script in the inspector.

It must be associated with a function, and the button will take the name of the function.


Certain parameters can be provided to call the function.

The parameters can be hard-coded or come from references.

using MVsToolkit.Dev;



private bool isInvincible;

[Button]
private void EnableInvinsibility()
{
  isInvincible = true;
} 

[Button(true)]
private void SetInvinsibility(bool value)
{
  isInvincible = value;
} 

[Button("isInvincible")]
private void PrintInvincibility(bool invincibility)
{
  Debug.Log(invincibility);
}

Require namespace MVsToolkit.Dev

Create a free website with Framer, the website builder loved by startups, designers and agencies.