-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Mastering UI Development with Unity
By :

There are multiple ways to work with the Input System’s Actions in your code. In this section, I will give a general overview of the most important topics that should allow you to get started working with the Input System.
To connect your Actions to your code, you will need to import the InputSystem
with the following statement:
using UnityEngine.InputSystem;
There are two ways in which I will discuss connecting Actions to your Code:
PlayerInput
componentNote
For more information about alternate ways you can connect Actions to your code, see the following Unity documentation:
https://docs.unity3d.com/Packages/[email protected]/manual/Workflows.html
You can reference the Action Asset creating a variable of type InputActionsAsset
like so:
[SerializeField] private InputActionAsset actions;
You can then assign the value of actions
in the Inspector.
And to reference...