Unity Guide

Cross platform input controller | Unity

A quick guide about how to implement mobile input in Unity

Before starting

If you’ve been following my previous posts, then you’ll remember that I implemented the movement and other mechanics using the new input system in Unity. I truly recommend to check these posts before starting this post in case that you don’t know how to use the new input system:

Current input actions

In the current input actions asset we contain 3 different actions:

New control scheme

Adding the mobile input

And now, in order to use the mobile input, let’s add the respective sprites into the canvas. To move we’ll use a left stick and to jump and attack we’ll use two buttons at the right:

Extra (buttons)

If we want to implement the buttons we’ll just have to follow the same process for the other actions in the input actions asset. Just select the respective control path to bond with the action:

Nerd For Tech

From Confusion to Clarification

Nerd For Tech

NFT is an Educational Media House. Our mission is to bring the invaluable knowledge and experiences of experts from all over the world to the novice. To know more about us, visit https://www.nerdfortech.org/.

Fernando Alcantara Santana

Written by

A passionate computer technology engineer and Unity developer that is always looking to grow in every aspect of life :).

Nerd For Tech

NFT is an Educational Media House. Our mission is to bring the invaluable knowledge and experiences of experts from all over the world to the novice. To know more about us, visit https://www.nerdfortech.org/.