Posted on

New Input System in Unity 2020 – Local Multiplayer

In this lesson, we will be going over how to implement local multiplayer using the new input system in Unity. This new input system has actually made this very easy.

To do this all you have to first create a out of your player object. We will then need to create an object with the component. You then need to add the player prefab into this component. Now when you play your game you should be able to just press a button with multiple input devices which will instantiate a new play into the scene for each device.

Posted on

New Input System in Unity 2020 – Controlling Movement

For this lesson, we will be going over how to control your player object with the Player Input component and your Input Action Asset. The new input system is quite different from the old system. The old system relies on the Input class and checking for inputs in the update function for it to work. This is no longer need in the new system.

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.