Book Image

Unity Virtual Reality Projects - Second Edition

By : Jonathan Linowes
Book Image

Unity Virtual Reality Projects - Second Edition

By: Jonathan Linowes

Overview of this book

Unity has become the leading platform for building virtual reality games, applications, and experiences for this new generation of consumer VR devices. Unity Virtual Reality Projects walks you through a series of hands-on tutorials and in-depth discussions on using the Unity game engine to develop VR applications. With its practical and project-based approach, this book will get you up to speed with the specifics of VR development in Unity. You will learn how to use Unity to develop VR applications that can be experienced with devices such as Oculus, Daydream, and Vive. Among the many topics and projects, you will explore gaze-based versus hand-controller input, world space UI canvases, locomotion and teleportation, software design patterns, 360-degree media, timeline animation, and multiplayer networking. You will learn about the Unity 3D game engine via the interactive Unity Editor, and you will also learn about C# programming. By the end of the book, you will be fully equipped to develop rich, interactive VR experiences using Unity.
Table of Contents (15 chapters)

What this book covers

Chapter 1, Virtually Everything for Everyone, is an introduction to the new technologies and opportunities in consumer virtual reality in games and non-gaming applications, including an explanation of stereoscopic viewing and head tracking.

Chapter 2, Content, Objects, and Scale, introduces the Unity game engine as we build a simple diorama scene and reviews importing 3D content created with other tools such as Blender, Tilt Brush, Google Poly, and Unity EditorXR.

Chapter 3, VR Build and Run, helps you set up your system and Unity project to build and run on your target device(s), including SteamVR, Oculus Rift, Windows MR, GearVR, Oculus Go, and Google Daydream.

Chapter 4, Gaze-Based Control, explores the relationship between the VR camera and objects in the scene, including 3D cursors and gaze-based ray guns. This chapter also introduces Unity scripting in the C# programming language.

Chapter 5, Handy Interactables, looks at user input events using controller buttons and interactable objects, using various software patterns including polling, scriptable objects, Unity events, and interactable components provided with toolkit SDK.

Chapter 6, World Space UI, implements many examples of user interface (UI) for VR using a Unity world space canvas, including a heads-up display (HUD), info-bubbles, in-game objects, and a wrist-based menu palette.

Chapter 7, Locomotion and Comfort, dives into techniques for moving yourself around a VR scene, looking closely at the Unity first-person character objects and components, locomotion, teleportation, and room-scale VR.

Chapter 8, Playing with Physics and Fire, explores the Unity physics engine, physic materials, particle systems, and more C# scripting, as we build a paddle ball game to whack fireballs in time to your favorite music.

Chapter 9, Exploring Interactive Spaces, teaches how to build an interactive art gallery, including the level design, artwork lighting, data management, and teleporting through space.

Chapter 10, Using All 360 Degrees, explains 360-degree media and uses them in a variety of examples, including globes, orbs, photospheres, and skyboxes.

Chapter 11, Animation and VR Storytelling, builds a complete VR storytelling experience using imported 3D assets and soundtrack, and Unity timelines and animation.

Chapter 12, Social VR Metaverse, explores multiplayer implementations using Unity Networking components as well as developing for Oculus platform avatars and VRChat rooms.

Chapter 13, Optimizing for Performance and Comfort, demonstrates how to use the Unity Profiler and Stats window to reduce latency in your VR app, including optimizing your 3D art, static lighting, efficient coding, and GPU rendering.