Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Unity Virtual Reality Projects

You're reading from  Unity Virtual Reality Projects

Product type Book
Published in Sep 2015
Publisher Packt
ISBN-13 9781783988556
Pages 286 pages
Edition 1st Edition
Languages
Author (1):
Jonathan Linowes Jonathan Linowes
Profile icon Jonathan Linowes

Table of Contents (18) Chapters

Unity Virtual Reality Projects
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Virtually Everything for Everyone Objects and Scale VR Build and Run Gaze-based Control World Space UI First-person Character Physics and the Environment Walk-throughs and Rendering Using All 360 Degrees Social VR Metaverse What's Next?
Index

The device-independent clicker


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):

  1. In the Project panel, select the top-level Assets folder.

  2. Right-click and navigate to Create | Folder. Name it Scripts.

  3. With the Scripts folder selected, right-click and navigate to Create | C# Script. Name it Clicker.

  4. Double-click on the...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}