There is one more thing I want to do, which will be very helpful in later chapters of this book. At the time of writing this book, VR input has not yet been settled across all platforms. Input devices may or may not fit under Unity's own Input Manager and APIs. In fact, input for VR is a huge topic and deserves its own book. So here, we will keep it simple.
As a tribute to the late Steve Jobs and a throwback to the origins of Apple Macintosh, I am going to limit these projects to mostly one-click inputs! Let's write a script for it, which checks for any click on the keyboard, mouse, or other managed device. (I have provided a detailed introduction to the Unity scripting in the next chapter, so please just follow along for now):
In the Project panel, select the top-level Assets folder.
Right-click and navigate to Create | Folder. Name it
Scripts
.With the
Scripts
folder selected, right-click and navigate toCreate | C# Script
. Name itClicker
.Double-click on the...