At this point, we can test our code to verify that it works.
Tip
You should still have the PlayerInput
GameObject that we created before, but if you don't, here are the steps to create another:
In the Hierarchy window, right-click and select Create Empty. Select the new GameObject in Hierarchy. Then in Inspector, click on Add Component.
Search for
Player
, and Player Input should appear in the list. Click on Player Input to add it to the components of the GameObject.
To test, click on the Play button in the editor. It is located at the top center of the editor. Now, if you scroll down and don't move the mouse when the button is down, the console should read Tap. If you scroll down and move the mouse when the button is down, the console should read Swipe.