ExperimentalExperimentalnameThe name of the Asset in Lens Studio.
Readonly ExperimentaluniqueExperimentalCreates a new game controller session and subscribes to the platform service. Returns a GameControllerSession whose event properties can be used to subscribe to controller lifecycle and input events.
StaticgetExperimentalReturns the name of this object's type.
ExperimentalReturns true if the object matches or derives from the passed in type.
ExperimentalReturns true if this object is the same as other. Useful for checking if two references point to the same thing.
Provides access to game controller input on Spectacles. Import this module to enable game controller support in your Lens.
Use
createController()to open a session and subscribe to input events from connected Bluetooth game controllers. The session provides controller discovery, input events, and haptic feedback (rumble). Subscribe to events via the session's event properties (e.g.onButtonEvent.add(...)). Multiple controller sessions may be active simultaneously.Since
Lens Scripting Version 373
Snap OS
Example