Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


IsJoystickPreconfigured(string)

Determine whether a particular joystick model has been preconfigured by Unity. (Linux-only).
Read time 1 minuteLast updated 6 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.InputLegacyModule
public static bool IsJoystickPreconfigured(string joystickName)

Parameters

joystickName

The name of the joystick to check (returned by Input.GetJoystickNames).

Returns

Type

Description

boolTrue if the joystick layout has been preconfigured; false otherwise.

Remarks

Note: This API is part of the legacy Input Manager. The recommended best practice is that you don't use this API in new projects. For new projects, use the Input System package. To learn more about input, refer to Input.
Preconfigured joysticks report indices for buttons and axes in the following order. Buttons: A, B, X, Y, left bumper, right bumper, select, start, guide, left stick press, right stick press Axes: left stick x, left stick y, left trigger, right stick x, right stick y, right trigger, dpad horizontal, dpad vertical.