Preparing search index...

    Enumeration ControllerTypeExperimental

    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.

    Lens Scripting Version 373

    //@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");
    }
    });
    Index

    Enumeration Members

    NintendoSwitchPro: number

    Nintendo Switch Pro Controller.

    Lens Scripting Version 373

    PS3: number

    PlayStation 3 (DualShock 3) controller.

    Lens Scripting Version 373

    PS4: number

    PlayStation 4 (DualShock 4) controller.

    Lens Scripting Version 373

    PS5: number

    PlayStation 5 (DualSense) controller.

    Lens Scripting Version 373

    Standard: number

    Generic standard gamepad.

    Lens Scripting Version 373

    Unknown: number

    Unknown or unrecognized controller type.

    Lens Scripting Version 373

    Xbox360: number

    Xbox 360 controller.

    Lens Scripting Version 373

    XboxOne: number

    Xbox One / Xbox Series controller.

    Lens Scripting Version 373