Button
Functions
UnregisterAllCallbacks
function Button.UnregisterAllCallbacks()
Button.UnregisterAllCallbacks
Unregisters all callbacks associated to this button.
Example
Button.UnregisterAllCallbacks()
RegisterCallback
function Button.RegisterCallback()
Button.RegisterCallback
Registers a callback for when this button is clicked.
Example
Button.RegisterCallback(Callback, parameters)
RegisterMouseEnterCallback
function Button.RegisterMouseEnterCallback()
Button.RegisterMouseEnterCallback
Registers a callback for when the mouse entered the area of this button.
Example
Button.RegisterMouseEnterCallback(Callback, parameters)
UnregisterAllMouseEnterCallbacks
function Button.UnregisterAllMouseEnterCallbacks()
Button.UnregisterAllMouseEnterCallbacks
Unregister all mouse enter callbacks.
Example
Button.UnregisterAllMouseEnterCallbacks()
RegisterMouseExitCallback
function Button.RegisterMouseExitCallback()
Button.RegisterMouseExitCallback
Registers a callback for when the mouse exits the area of this button.
Example
Button.RegisterMouseExitCallback(Callback, parameters)
UnregisterAllMouseExitCallbacks
function Button.UnregisterAllMouseExitCallbacks()
Button.UnregisterAllMouseExitCallbacks
Unregister all mouse exit callbacks.
Example
Button.UnregisterAllMouseExitCallbacks()
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)
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()