API reference
API reference
Select your platform
No SDKs available
No versions available

ButtonClickAction Struct

A struct to consolidate all the options for a button action.
// Instantiate a new button action
var buttonAction = new ControllerButtonsMapper.ButtonClickAction
{
    Title = "Spawn Object",
    Button = OVRInput.Button.PrimaryIndexTrigger,
    ButtonMode = ControllerButtonsMapper.ButtonClickAction.ButtonClickMode.OnButtonUp,
    Callback = new UnityEvent()
};

Member Enumerations

Enumeration ButtonClickMode

Button click mode types.
OnButtonDown will trigger on the first frame when the button is down. OnButtonUp will trigger on the first frame when the user presses releases the button. OnButton triggers repeatedly when the user holds the button down.
OnButtonUp
No description available
OnButtonDown
No description available
OnButton
No description available

Fields

A title for this button action.
Sets the button that will trigger the Callback when the ButtonMode is detected (usually ButtonMode.OnButtonUp).
Button click type: OnButtonUp, OnButtonDown, and OnButton.
Use OnButtonUp to trigger the callback when the user releases the button.
Dispatches when Button matches the chosen ButtonMode.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon