Skip to main content

GameControllerModule.ButtonEventType

Enum

Whether a button changed to pressed or released.

  • Snapchat: not supported
  • SPECS: fully supported
  • Camera Kit Web: not supported
  • Camera Kit Mobile: not supported
1 platform note
  • SnapchatNot supported — Available on SPECS only
  • SPECSFully supported
    • Experimental API; it may change or be removed.
  • Camera Kit WebNot supported — Available on SPECS only
  • Camera Kit MobileNot supported — Available on SPECS only

Platform details

  • Snapchat — Not supported — Available on SPECS only.

  • SPECS — Fully supported. Experimental API; it may change or be removed

  • Camera Kit Web — Not supported — Available on SPECS only.

  • Camera Kit Mobile — Not supported — Available on SPECS only.

Since Lens Scripting v373Experimental

Whether a button changed to pressed or released.

Index

Enumeration Members

Example

//@input Asset.GameControllerModule gameControllerModule
var provider = script.gameControllerModule.createController();
provider.onButtonEvent.add(function(event) {
var action = event.eventType === GameControllerModule.ButtonEventType.Pressed ? "pressed" : "released";
print("Button " + event.button + " " + action);
});

Enumeration Members

Pressed

Pressed: number

ExperimentalSPECS

The button was pressed down.

Since

Lens Scripting Version 373


Released

Released: number

ExperimentalSPECS

The button was released.

Since

Lens Scripting Version 373