---
title: "Configuring an Xbox Controller for User Input - 2019.3"
content_type: tutorial
url: "https://learn.unity.com/tutorial/configuring-an-xbox-controller-for-user-input-2019-3?language=en"
language: en
difficulty: beginner
duration_minutes: 20
unity_version:
  - "2019.3"
supported_unity_versions:
  - name: "2019.3"
    url: "https://learn.unity.com/tutorial/configuring-an-xbox-controller-for-user-input-2019-3.md?language=en&version=2019.3"
available_languages:
  - name: "en"
    url: "https://learn.unity.com/tutorial/configuring-an-xbox-controller-for-user-input-2019-3.md?language=en"
  - name: "zh-cn"
    url: "https://learn.unity.com/tutorial/pei-zhi-xboxkong-zhi-qi-yi-shi-xian-yong-hu-shu-ru-2019-3.md?language=zh-cn"
last_updated: "2026-08-04T14:23:31.000Z"
---

# Configuring an Xbox Controller for User Input - 2019.3

Use Unity’s Input System package to configure an Xbox game controller and drive a simple input scenario.

Configuring an Xbox controller for user input in Unity is easily achieved through Unity’s new **Input System**, available as an installable Package. In this tutorial, we will set up a simple scenario that uses the Xbox game controller buttons.

## 1. Installing the Input System Package

_If you are using Unity 2019.2 or below, [click here](https://learn.unity.com/tutorial/configuring-an-xbox-controller-for-user-input-2019-2)._

**1.** From the Unity Editor’s top menu drop-down, select **Window** > **Package Manager**.

**2.** In the Project Settings window, from the Advanced dropdown menu, select **Show Preview Packages**.

**3.** In the **All Packages** column, select **Input System**, and select **Install** (**Figure 01**).

![Figure 01: Installing the Input System Package in the Package Manager Window](https://connect-mediagw.unity.com/h1/20200507/learn/images/0093444f-2447-477e-aa00-a62ff67df70e_image8.png)

**4.** A Warning dialogue appears, verifying that the Project needs to enable Native Platform Backends.  Select **Yes**, and Restart the Unity Editor.

**5.** After restarting, you can verify your Project’s newly installed **Input System**, by opening up the **Project Settings**. Select from the top dropdown menu **Edit** > **Project Settings**.

In the left column, select **Player**.  In the main window of the **Project Settings** Window, select **Other Settings** (**Figure 02**). Expand **Other Settings**, and scroll down to **Active Input Handling**.  Select either **Both**, or **Input System Package (New)** (**Figure 03**).

![Figure 02: Selecting the Other Settings of Player in the Project Settings Window.](https://connect-mediagw.unity.com/h1/20200507/learn/images/f04a63c1-33d9-4838-9799-fe5e16d76aa5_image3.png)

![Figure 03: Verifying the Active Input Handling to the New Input System Package.](https://connect-mediagw.unity.com/h1/20200507/learn/images/936413a6-eed8-449c-9b0a-949d26981b29_image17.png)

## 2. Creating Your Custom Inputs

**1.** Create a new **Input Action** by right-clicking in the Project Window, and select **Create** > **Input Actions**.  Rename the new **Input Action** to “**InputMaster**”.

**2.** Double-click the newly created “**InputMaster**” in the Project Window, to open up the **Input Actions** Window.

**3.** On the top left corner of the **Input Actions** Window, select the **No Control Schemes** dropdown, and then select **Add Control Scheme** (**Figure 04**).

![Figure 04: Adding a new Control Scheme](https://connect-mediagw.unity.com/h1/20200507/learn/images/c8389f81-e307-4eb3-84b6-ab9ab8414536_image9.png)

**4.** In the **Add Control Scheme** Window, select the **+** button to create a new **Control Scheme,** and rename the **Scheme Name** to “**Xbox Control Scheme**” (**Figure 05**). Later, you can always create additional **Control Schemes** for adding other input sources, such as from the keyboard.

![Figure 05: Selecting the + button to add a new Control Scheme](https://connect-mediagw.unity.com/h1/20200507/learn/images/53f79d12-0534-40cc-837d-0834340651db_image10.png)

**5.** Within the menu, select **Gamepad** > **Xbox Controller** > **Xbox Controller** (**Figure 06**).

![Figure 06: Selecting the Xbox Controller](https://connect-mediagw.unity.com/h1/20200507/learn/images/1f1a4a01-d9ed-4208-8cd6-d6f7f39cbe76_image13.png)

**6.** Next, in the **Add Control Scheme** Window, select **Save** (**Figure 07**).

![Figure 07: Saving the Xbox Control Scheme](https://connect-mediagw.unity.com/h1/20200507/learn/images/c60c8e47-1be9-4cf7-9adf-1366f8f50016_image19.png)

**7.** Next, on the left **Action Maps** panel of the **Input Actions** Window, select the **+** button to create a **New Action Map**.  **Action Maps** are categories for how your inputs will be organized, for example, you might have separate **Action Map** categories for the player, menu-items, camera views, or vehicles.  Here, rename your **Action Map** to “**Player**”.

**8.** A **New Action** has now been added to the middle **Actions** panel. **Actions** are essentially events, such as a player running or jumping. Double-click the **New Action** and rename it to “**Jump**”. We will then **Bind** specific buttons on the gamepad controller to trigger each **Action**.  Select the **+** button to the right of the ”**Jump**” **Action**, and then select **Add Binding** (**Figure 08**).

![Figure 08: Adding a Binding to a New Action](https://connect-mediagw.unity.com/h1/20200507/learn/images/4154267f-9be9-4af9-a4c0-850b3a55bdbf_image11.png)

**9.** Next, in the **Properties** panel of the “**InputMaster**” Window, select the **Binding Path** field (**Figure 09**).

![Figure 09: Selecting the Binding Path](https://connect-mediagw.unity.com/h1/20200507/learn/images/eb9b3ade-21e5-4d16-980e-c3818c4fbe96_image18.png)

**10.** You will see a list of **Gamepad** buttons and controls.  Scroll all the way down to select the specific list of buttons for the **Xbox Controller** (**Figure 10**).

![Figure 10: Selecting the specific buttons to the Xbox Controller](https://connect-mediagw.unity.com/h1/20200507/learn/images/fc736115-52b6-4438-9061-159a6c3925ce_image4.png)

**11.** Select the specific button for the **Xbox Controller** from the list of available choices. Alternatively, select the **Listen** button, and press the corresponding button on your controller itself (**Figure 11**).

![Figure 11: Selecting the Listen Button, awaiting the input from the Controller itself.](https://connect-mediagw.unity.com/h1/20200507/learn/images/cfb647a1-1a3e-49cb-843e-980c870496db_image14.png)

**12.** We can further assign controller **Actions** for player movement, much in the same way as the previous steps for triggering a jump with a button.  For the sake of efficiency, you can also set up an **Action** to encompass movement along 2 Vectors.  Here we will create a new **Action**, rename it to “**Movement**”, and select **Button** to change the **Action Type** (**Figure 12**).

![Figure 12: Selecting the Action Type Button.](https://connect-mediagw.unity.com/h1/20200507/learn/images/15afedd4-1243-4343-9a2e-d4ff8e9ee9d9_image16.png)

**13.** Select **Pass Through** as the **Action Type**, and then select **Vector 2** for its **Control Type** (**Figure 13**).

![Figure 13: Selecting Vector 2 for the Control Type.](https://connect-mediagw.unity.com/h1/20200507/learn/images/185b8df6-aa2f-4dbb-a823-dd7ba75e6f26_image6.png)

**14.** Now when you select the **+** button next to the **Movement Action**, you can select to add a **2D Vector Composite** (**Figure 14**).

![Figure 14: Selecting Add 2D Vector Composite.](https://connect-mediagw.unity.com/h1/20200507/learn/images/e60b2df4-407c-43e4-927c-29291924f1c9_image7.png)

**15.** Assign the Movement Vectors to the corresponding Xbox Controller inputs in the same manner as the previous steps (**Figure 15**).

![Figure 15: Selecting the corresponding Xbox Controller inputs.](https://connect-mediagw.unity.com/h1/20200507/learn/images/8900ba34-7985-4bfd-b736-31732481ecb1_image12.png)

**16.** Create any additional **Input Actions** you will need for your Project, exploring through the various features that the **Input System** offers. When finished, select **Save Asset**. For the full documentation of the **Input System**, follow this [link](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.0/manual/index.html).

**17.** We will now set up the **Player Input Component** to the Player. With the Player **GameObject** selected in the Hierarchy Window, select **Add Component** in the Inspector Window, and search for **Player Input** (**Figure 16**).

![Figure 16: Adding the Player Input Component to your Player.](https://connect-mediagw.unity.com/h1/20200507/learn/images/06dc84b9-1a71-4160-ab95-aae9af95fe5f_image2.png)

**18.** Next, Select the Object Picker Button to assign the **Input Actions** Asset we named “**InputMaster**”, to the **Player Input** Component (**Figure 17**).

![Figure 17: Selecting the Object Picker Button to assign the InputMaster Asset to the Player Input.](https://connect-mediagw.unity.com/h1/20200507/learn/images/02d40603-74dc-44dc-8846-bdc750482d2e_image20.png)

**19.** Next, assign the **Default Scheme** to the **Xbox Control Scheme**, and assign the **Default Map** to **Player** (**Figure 18**).

![Figure 18: Assigning the Default Scheme and Default Map.](https://connect-mediagw.unity.com/h1/20200507/learn/images/fb7d8798-f2fd-454d-b7c6-3cc42106e8c5_image5.png)

**20.** Lastly, the **Input System** will generate the C# Script for your **Input Actions** for further modification of your Project’s needs. Select “**InputMaster**” from the Project Window, select the **Generate C# Class** checkbox in the Inspector Window, and select **Apply** (**Figure 19**).

![Figure 19: Generating the C# Script.](https://connect-mediagw.unity.com/h1/20200507/learn/images/09faa0fd-657c-4eeb-bdb8-f1638def241e_image1.png)

**21.** The resulting code is saved as a C# Script, with the saved name of “**InputMaster.cs**” (**Figure 20**).

![Figure 20: The Generated C# Script.](https://connect-mediagw.unity.com/h1/20200507/learn/images/a91baa2b-b4b0-4928-85fa-ba3dc2adfb61_image15.png)

**22.** Enter **Play Mode** and test out your Project’s Xbox Game Controller inputs. Your individual project will determine which **Input Action** is more appropriate based on the desired feel.

## 3. Conclusion

The Xbox game controller is easy to configure and use within Unity's **Input System** Package.  The **Input System** enables a variety of input control options to bind to your specific Xbox game controller’s buttons.
