Book Image

Mastering Oculus Rift Development

By : Jack Donovan
Book Image

Mastering Oculus Rift Development

By: Jack Donovan

Overview of this book

Virtual reality (VR) is changing the world of gaming and entertainment as we know it. VR headsets such as the Oculus Rift immerse players in a virtual world by tracking their head movements and simulating depth, giving them the feeling that they are actually present in the environment. We will first use the Oculus SDK in the book and will then move on to the widely popular Unity Engine, showing you how you can add that extra edge to your VR games using the power of Unity. In this book, you’ll learn how to take advantage of this new medium by designing around each of its unique features. This book will demonstrate the Unity 5 game engine, one of most widely-used engines for VR development, and will take you through a comprehensive project that covers everything necessary to create and publish a complete VR experience for the Oculus Rift. You will also be able to identify the common perils and pitfalls of VR development to ensure that your audience has the most comfortable experience possible. By the end of the book, you will be able to create an advanced VR game for the Oculus Rift, and you’ll have everything you need to bring your ideas into a new reality.
Table of Contents (17 chapters)
Mastering Oculus Rift Development
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Using the Unity profiler


The Unity3D engine comes with a full-featured profiler that's a great tool for dissecting everything that it's doing behind the scenes every frame. In this section, we'll write some functions that tax the processor and track them in the Unity profiler.

Create a new Unity project called PerformanceSandbox. Save a scene called main.unity in a new folder called Scenes. Next, create a folder called Scripts and create a new C# script in it named StressTestSystem. When you're done, your Project window should look something like the following screenshot:

Now is a good time to add the Profiler window to your Editor layout. Select Profiler from the Window menu on the toolbar at the top of the editor. Add the window as a new tab next to the Scene window. It's a good idea to keep the Profiler window in a place where you can see it at the same time as your Game view, so you can see what Unity is rendering while you analyze it.

Tip

You can quickly open the profiler at any time...