GameControllerModule.ButtonEventType
EnumWhether a button changed to pressed or released.
- Snapchat: not supported
- SPECS: fully supported
- Camera Kit Web: not supported
- Camera Kit Mobile: not supported
- 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
Since Lens Scripting v373Experimental
Whether a button changed to pressed or released.
Index
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