Button

Functions

SetActive

 function Button.SetActive((bool)Activate or Deactivate)
Parameter Type 📝 Description
Activate or Deactivate bool Desired activation status.

Button.SetActive

Activates/Deactivates the object based on the bool parameter value

Example

button.SetActive(true)
Activates the Button.


IsActive

 function Button.IsActive()

Button.IsActive

Returns true if the object is active in the hierarchy

Example
button.IsActive()

Recycle

 function Button.Recycle()

Button.Recycle

This will disable this Button and register it back into the ObjectPool so it can be spawned again when a similar object is needed. If you have a reference to this Button you should get rid of it after calling recycle.

Example
button.Recycle()

Destroy

 function Button.Destroy()

Button.Destroy

This will destroy this object. It will no longer exist.

Example
button.Destroy()

Comments