At this point, we can test our code to verify that it works.
You should still have the PlayerInput
GameObject that we created before, but if you don't, here are the steps to create another:
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.