Posted on

New Input System in Unity 2020 – Player Input Component

In this video, we will be going over the new Player Input Component that comes with the new Input system for Unity. This component is used to bridge that gap between the input action asset and you c# scripts.

First you need to have a player object that you wish to control with your input action asset. You will then need to add a player input component to this object. Next you will need to add you input action asset to this player input component. Now we will change the behavior to Unity events. At this point you will need to have a script attached to your player object that contains some public function, one for each action in you Action maps. Finally you will need to set the Unity Events to the different public function in your script.

Posted on

New Input System in Unity 2020 – Multiple Input Devices

If you want to have your games cross-platform then you will need to have the ability to read in multiple device inputs. Computers use keyboards, consoles use gamepads, and mobile devices use touch inputs. To do this you can add multiple input bindings to each action of your input action asset. The new input system for Unity is really good for this because it will automatically detect the input device being used and send the actions to your scripts accordingly

Presidential Slap

Posted on

New Input System in Unity 2020 – Most Important Thing to Remember

We already talked about this in the last video but I thought I would re-emphases the importance of remembering to save your Input Action Asset after each change you make. The easiest thing to do is to enable the auto-save option but this can be a bit annoying if Unity is slow to process the changes. If you are making a lot of changes all at once you might want to wait until the end of all your changes before you save them.