This tutorial was created with Unity version 2019.4.
User input is a core pillar of an interactive and engaging experience. Once you collect it, it’s important you present an experience that feels natural and intuitive to the player. In this tutorial, you’ll cover the basics of the new Unity Input System by creating a demo project that can:
Place a 3D model by dragging it off the User Interface (UI) and dropping it into the world.
Move the camera by dragging one finger.
Zoom the camera by pinching two fingers.
Learning Outcomes
You’ll learn how to:
Install the new Input System’s package.
Enable Touch Simulation mode.
Collect and process touch input via the EnhancedTouch API.
Route Input System events to the UI.
Prerequisites
This tutorial assumes you already have basic knowledge of Unity and intermediate knowledge of C#.
You need Unity 2019.4 or later to follow along with this tutorial.
While you can enable simulation mode for testing, the behavior is unpredictable and only simulates a single touch. As a result, you also need a touch device to complete this tutorial.
Resources
Comments, concerns and/or questions can be posted here.