Skip to main content

GameControllerModule.ControllerType

Enum

Controller family as reported by the device.

  • 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

Controller family as reported by the device. Useful for displaying correct button labels. Third-party controllers commonly identify as one of the first-party types.

Index

Example

//@input Asset.GameControllerModule gameControllerModule
var provider = script.gameControllerModule.createController();
provider.onControllerConnected.add(function(event) {
if (event.controller.type === GameControllerModule.ControllerType.PS5) {
print("A PS5 (DualSense) controller connected");
}
});

Enumeration Members

NintendoSwitchPro

NintendoSwitchPro: number

ExperimentalSPECS

Nintendo Switch Pro Controller.

Since

Lens Scripting Version 373


PS3

PS3: number

ExperimentalSPECS

PlayStation 3 (DualShock 3) controller.

Since

Lens Scripting Version 373


PS4

PS4: number

ExperimentalSPECS

PlayStation 4 (DualShock 4) controller.

Since

Lens Scripting Version 373


PS5

PS5: number

ExperimentalSPECS

PlayStation 5 (DualSense) controller.

Since

Lens Scripting Version 373


Standard

Standard: number

ExperimentalSPECS

Generic standard gamepad.

Since

Lens Scripting Version 373


Unknown

Unknown: number

ExperimentalSPECS

Unknown or unrecognized controller type.

Since

Lens Scripting Version 373


Xbox360

Xbox360: number

ExperimentalSPECS

Xbox 360 controller.

Since

Lens Scripting Version 373


XboxOne

XboxOne: number

ExperimentalSPECS

Xbox One / Xbox Series controller.

Since

Lens Scripting Version 373