

That means you only have to handle the actions the players trigger. The new Input System separates device input from code actions. The code uses if-else branching to handle support for different devices and their associated actions. Return Input.GetAxis("Gamepad Fire") >= triggerAxisThreshold The following code, which supports both gamepads and keyboards, is an example of the old way of doing things: bool isGamepad = Input.GetAxis("Gamepad Fire") != 0f The old input system checked input from different devices every frame to determine whether players took an action. What’s New in the Unity Input Systemīefore diving into the code, take a look at the new Input System’s features. You’ll learn how to use the new Input System to replace the old system later in the tutorial. Open GameScene from the Scenes folder and click Play to try the game for yourself!Ĭurrently, the Move and Jump controls use the old Unity Input Manager. You control the player character by moving around and jumping to collect coins. The starter project is a simple platformer game. Textures: The graphics used by Materials and UIs.Shaders: Shaders for special effects like the player’s shadow.Settings: The settings file, which is where you’ll put the input settings.


Take a look at the organization of the folder: Unzip its contents and open NewUnityInputSystem-Starter in Unity.Īfter the project loads, you’ll see the RW folder in the Project Window: If you’re new to Unity development, check out our tutorial on Getting Started In Unity.įirst, download the starter project for this tutorial using the Download Materials button at the top or bottom of this page. Note: Although this tutorial is for beginners, you’ll need to have some basic knowledge of Unity development and how to work with Unity Editor to complete it.
