SUIButton
Index
Functions Index
Function Name
Properties Index
Property Name
Functions
OnClick
Parameter
Type
Description
function OnClickFunction()
--
end
Space.Host.ExecutingObject.UIButton.OnClick(OnClickFunction)Space.Host.ExecutingObject.UIButton.Enabled = true--clicking this object will toggle Enable/Disable an object's Button component
thisGameObject = Space.Host.ExecutingObject
button = Space.Host.GetReference("button").UIButton
--make sure to add this reference to the Scripting Runtime component
OnClick = function()
button.Enabled = not button.Enabled
end
thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)Space.Host.ExecutingObject.UIButton.Interactable = true--clicking this object will toggle Interactable status on an object's Button component
thisGameObject = Space.Host.ExecutingObject
button = Space.Host.GetReference("button").UIButton
--make sure to add this reference to the Scripting Runtime component
OnClick = function()
button.Interactable= not button.Interactable
end
thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)Space.Host.ExecutingObject.UIButton.NormalColor = Color.RedSpace.Host.ExecutingObject.UIButton.NormalColor = Color.RedSpace.Host.ExecutingObject.UIButton.PressedColor = Color.RedSpace.Host.ExecutingObject.UIButton.PressedColor = Color.RedSpace.Host.ExecutingObject.UIButton.ColorMultiplier = Color.RedSpace.Host.ExecutingObject.UIButton.GameObject = Color.Red