Creating custom Unity input axes
So far, you've coded your own input and used predefined axes in Unity's InputManager, but you haven't yet defined your own axis. In this section, we'll do this by adding a new axis called Reset, which we'll tie in with a dummy manager to find all practice dummies in a scene and set all of their nodes back to red.
Open the InputManager again by mousing over Project Settings in the Edit menu and selecting Input. Click on in the Size field directly beneath Axes and add one to the total count; in the following screenshot, we had 26 axes, so we updated it to 27
:
Now, scroll to the bottom of the list of axes and you'll see a duplicate of whatever the last axis was at the end of the list. When you create a new input axis, it will automatically be assigned all of the same values that the last one had, but we'll be replacing these values to make it unique.
Expand the final input axis in the list and rename it Reset
, as shown in the...