Home
Login
Register
Search
Home
Unityt
Unityt
March 27, 2018 | Author: Muhammad Yusuf | Category:
Virtual Reality
,
Unity (Game Engine)
,
Oculus Vr
,
Software Development Kit
,
Android (Operating System)
DOWNLOAD
Share
Report this link
Comments
Description
Oculus Utilities for Unity5.x Developer Guide Version 0.1.3.0 Beta 2 | Introduction | Unity Copyrights and Trademarks © 2016 Oculus VR, LLC. All Rights Reserved. OCULUS VR, OCULUS, and RIFT are trademarks of Oculus VR, LLC. (C) Oculus VR, LLC. All rights reserved. BLUETOOTH is a registered trademark of Bluetooth SIG, Inc. All other trademarks are the property of their respective owners. Certain materials included in this publication are reprinted with the permission of the copyright holder. 2 | | Unity | Contents | 3 Contents Introduction.......................................................................................................... 5 Compatibility and Requirements....................................................................................................................... 5 Downloading Utilities for Unity......................................................................................................................... 7 Preparing for Development: PC SDK................................................................................................................7 Preparing for Development: Mobile SDK......................................................................................................... 8 Getting Started.................................................................................................... 9 Unity VR Support............................................................................................................................................... 9 Importing the Oculus Utilities Package.............................................................................................................9 Importing Sample Applications: Mobile SDK................................................................................................. 10 Migrating to Utilities from the Integration Package....................................................................................... 11 A Detailed Look at Oculus Utilities for Unity.....................................................13 Contents........................................................................................................................................................... 13 Prefabs..............................................................................................................................................................14 Unity Components........................................................................................................................................... 16 Oculus Mobile SDK Examples.........................................................................................................................18 OVRInput............................................................................................................ 20 OVRInput Usage.............................................................................................................................................. 20 Touch Input Mapping......................................................................................................................................23 Xbox Input Handling....................................................................................................................................... 24 Configuring for Build......................................................................................... 26 PC Build Target: Microsoft Windows and Mac OS X..................................................................................... 26 Build Settings and Player Settings.............................................................................................................26 Quality Settings.......................................................................................................................................... 28 Running the Build.......................................................................................................................................29 Mobile Build Target: Android......................................................................................................................... 29 Build Settings............................................................................................................................................. 30 Player Settings............................................................................................................................................ 30 Running the Build.......................................................................................................................................31 Best Practices: Mobile....................................................................................... 32 Design Considerations.....................................................................................................................................32 Best Practices...................................................................................................................................................32 General CPU Optimizations.............................................................................................................................33 Rendering Optimization...................................................................................................................................33 Unity Profiling Tools........................................................................................................................................ 35 Troubleshooting and Known Issues...................................................................38 General Issues..................................................................................................................................................38 PC..................................................................................................................................................................... 38 OS X.................................................................................................................................................................39 Mobile.............................................................................................................................................................. 39 Contact Information......................................................................................................................................... 40 Tutorial: Build a Simple VR Unity Game............................................................41 4 | Contents | Unity Installation and Preparation.............................................................................................................................41 Modify Roll-a-ball for VR................................................................................................................................. 42 Build and Play..................................................................................................................................................44 Unity-SDK Version Compatibility....................................................................... 45 Release Notes.................................................................................................... 46 0.1 0.6 0.6 0.5 0.4 Beta Utilities for Unity Release Notes.......................................................................................................46 Unity Legacy Integration Release Notes...................................................................................................48 PC Unity Integration Release Notes......................................................................................................... 52 Mobile Unity Integration Release Notes...................................................................................................52 Mobile Unity Integration Release Notes...................................................................................................53 Unity | Introduction | 5 Introduction This guide describes developing Unity 3D games and applications for VR devices with the Oculus PC and mobile SDKs. The Utilities package is for use with Unity Professional and Personal editions versions 5.x. Projects using Unity 4 should use our Unity 4.x Legacy Integration package instead. We strongly recommend developers beginning new projects use Unity 5.1+ and our Utilities package. For more information on version compatibility, see Compatibility and Requirements. This guide covers: • • • • • • • Getting started Downloading and installing the Utilities package Contents of the Utilities package Input Mapping How to use the provided samples, assets, and sample applications Configuring Unity VR projects for build to various targets Building a simple VR Unity game (tutorial) Most information in this guide applies to the use of the Utilities package with either the Oculus PC or Mobile SDKs. Any exceptions are clearly indicated where they occur (e.g., the Moonlight folder in OVR contains assets designed for mobile development). When developing for both Rift and mobile platforms, keep in mind that the requirements for PC and mobile VR applications differ substantially. If you would like to generate builds for both PC and mobile from a single project, it is important to follow the more stringent mobile development best practices. Unity First-Party VR Support With Unity 4, developers used the Oculus Integration package to import Oculus VR camera and controller prefabs. In Unity 5.1+, developers may substitute a stereoscopic VR camera with built-in orientation and positional tracking for their main camera by selecting the Virtual Reality Supported check box in Player Settings. Unlike the Legacy Integration, which was necessary for VR support in Unity 4, the Utilities package is an optional supplement with useful material to support development. See Unity VR Support for more information. Compatibility and Requirements System and Hardware Requirements Please review the relevant documentation to be sure that you are using supported hardware and that your development environment and devices are configured and set up properly: • PC SDK: Oculus Developer Guide • Mobile SDK: Setup Guide Before beginning Unity development, you should be able to run the Oculus SDK Unity sample applications. SDK Examples are available for use with our Mobile SDK.7 Unity Personal and Professional Licenses There are noteworthy feature support differences between Unity licenses. Utilities and Legacy Integration versions do not depend on specific runtimes. Unity Version Recommended Release Description / Oculus Compatibility Unity 5.1+ Unity 5.0. Unity 4 Unity 4. Projects built with the Oculus Unity Legacy Integration are not compatible with Unity’s VR support. For more details on the relationship between past and present Unity versions. Unity 4 VR support is provided by assets included with the Oculus Unity Legacy Integration package. and 0. For optional supplementary plugins and scripts.6. see Unity-SDK Version Compatibility. We are maintaining the Unity Integration for developers who are not ready to upgrade. Oculus Runtime (PC Only) For PC SDKs 0. Developers using Unity 4 and the Legacy Integration should start planning for migration to Unity 5.. PC SDK 0. Oculus PC and Mobile SDKs.7. Your license choice will depend largely on the performance characteristics and distribution needs of your app. If you are starting a new project.6 | Introduction | Unity Note: This integration does not currently support Windows 10.3.0. use the latest Oculus Utilities for Unity. Unity Version Compatibility Unity 5.6.g.1.0f1 Legacy Integration 0.7. 0.1+ provides support for virtual reality development with the Oculus Rift and Samsung Gear VR. . but it will be discontinued at some point in the future.7 is only guaranteed to work with runtime versions 0. Use the latest Oculus Legacy Integration.1p4 Utilities 0. optionally supplemented by the Oculus Utilities for Windows package.0 0.8 and 0. Please review the limitations cited below as well as the license comparison on Unity’s website before committing considerable resources to one path. and will run with reduced functionality on older Unity Versions and PC runtimes.7 5.7 through 1. Unity Version Integration/Utilities Version Compatible PC Runtime Unity 4.0f1 VR support is enabled by importing custom assets. and Oculus Unity Integration and Utilities packages.0.3. we strongly recommend using the appropriate version of Unity 5.0 0. (download separately) Unity 5.8.8 and 0. each SDK version only guarantees support for the current and previous runtime version.1.1 and the Utilities package.3.0 n/a Oculus does not support this Unity version.1p4 Provides first-party support for virtual reality development.7. e. This helps reduce aliasing during VR distortion rendering. For our Unity 4x Legacy Integration. and sample scenes to assist with development.oculus. Preparing for Development: PC SDK When developing for PC.com/unity/licenses Gamepad Controller You may wish to have a compatible gamepad controller for use with the supplied demo applications. • SDKExamples designed for use with the Mobile SDK (source) • Oculus Spatialization Plugin for Unity (included with Oculus Audio SDK) Oculus Utilities for Unity supplements Unity’s core VR support with additional development resources. they are available for download separately from our Downloads page here: https://developer. See Oculus Mobile SDKExamples for more information.Unity | Introduction | 7 A feature set comparison between Unity Professional and Personal editions may be found here: http:// unity3d. scripts. we recommend beginning with the Oculus Developer Guide and theOculus Best Practices Guide. D3D 9 and OpenGL do not currently work in VR with Unity.com/downloads/ Utilities Package Contents • A Utilities package containing scripts. and more. enable Direct3D 11. where the eye textures are interpolated with slightly greater dynamic range. • Use the Linear Color Space. it also causes Unity to perform sRGB read/write to the eye textures. . sample scenes. crosshairs. including assets. which includes information and guidelines for developing great VR experiences. an HID-compliant game controller for Mac. Recommended Configuration We recommend the following settings in your project: • On Windows. they are included in the Mobile SDK folder SDKExamples. SDK Examples is a resource for mobile developers that includes Unity example scenes illustrating the use of common resources such as menus. and should be considered a go-to reference when designing your Oculus-ready games. assets. Downloading Utilities for Unity All Oculus Unity development materials are available for download at our Developer site (requires login): https://developer. such as the Xbox 360 controller for Windows. Linear lighting is not only more correct for shading. For Utilities for Unity 5x.oculus.com/downloads/. D3D 11 exposes the most advanced VR rendering capabilities. et cetera • Project Settings assets Also Available Additional development resources are available separately from our Downloads page. or a Moga Pro or other compatible controller for Gear VR. 8 | Introduction | Unity • Never clone displays. and install the Java Development Kit (JDK) and Android SDK before beginning development. Be sure to read the Application Signing section of the Mobile SDK documentation for more information. most Unity developers do not need to install Android Studio or NDK. See Unity’s Getting Started with Android Development for more information. When the Rift is cloned with another display. Application Signing Mobile applications require two different signatures at different stages of development. . Mobile apps are subject to more stringent limitations and requirements and computational limitations which should be taken into consideration from the ground up. However. Android SDK Setup and Oculus Mobile SDK The Android SDK is required for mobile development with Unity. see "VrPlatform Entitlement Checks" in the Mobile SDK documentation. especially the Unity Best Practices: Mobile. used to protect apps from unauthorized distribution. Unity developers should follow the instructions in our Device Setup guide. Note: You must download the Oculus Mobile SDK if you wish to use OVRMonitor. is disabled by default in Unity. the application may not vsync properly. When developing for mobile. This leads to visible tearing or judder (stuttering or vibrating motion). Application Entitlement Checking Entitlement checking. Preparing for Development: Mobile SDK This guide describes setup requirements for Oculus mobile VR development with Unity. please be sure to fully review all of the relevant performance and design documentation. For more information and instructions. scripts. toggled by the Virtual Reality Supported checkbox in the Other Settings > Configuration tab of Player Settings. that reference frame is defined by the TrackingSpace GameObject. and positional and head tracking is automatically applied to your camera. delete all Oculus Integration content before importing the new Unity package.xml *vrapi* *vrlib* . which is the parent of the CenterEyeAnchor GameObject that has the Camera component. and sample scenes to assist with development.Unity | Getting Started | 9 Getting Started This section describes steps taken to begin working in Unity. Note: Unity’s VR support is not compatible with previous Oculus Unity Integrations. Delete Previously-Imported Assets If you have previously imported a Unity integration package. see The Oculus Utilities Package and Unity for more information. When Unity virtual reality support is enabled. then navigate to your Unity project folder and delete the following: Folder Content to Delete Assets/Plugins Oculus. For detailed information and instructions for using Unity’s VR support. Importing the Oculus Utilities Package The Oculus Utilities Unity Package includes assets. The Unity Game View preview does not apply lens distortion. Unity VR Support Unity 5. When Unity applies head tracking to the VR camera. overriding your camera’s transform. Be sure to close the Unity Editor.1 and later offer first-party virtual reality support.* Assets/Plugins/ Android/ *Oculus* AndroidManifest. see the Virtual Reality section of the Unity Manual. The image corresponds to the left eye buffer and uses simple pan-and-scan logic to correct the aspect ratio. any camera with no render texture is automatically rendered in stereo to your device. If you are using OVRCameraRig.* OVR. it applies it within the reference frame of the camera's local pose when the application starts. Click the Create button. The import process may take a few minutes to complete. Importing Sample Applications: Mobile SDK In this section we'll describe how to import sample Unity application source into Unity. as the Oculus Utilities package is fully self-contained. Unity Project If you are already working in a Unity project. Note: For Rift development. Utilities Package Note: If you are importing the Utilities package into a project that previously used our legacy Integration package. 4. You may manually copy these files to your [Project]/Assets/ProjectSettings folder. Make sure that the Setup defaults for: field is set to 3D. the Room sample application is included as a scene in the Utilities package. Click the Browse button and select the folder where the Unity project will be located.* Note: Be sure to delete OculusPlugin.* OVR. select File > New Project..* Assets/Plugins/ x86_64/ Oculus.unityPackage to import the assets into your new project. You do not need to import any standard or pro Unity asset packages. 3. save your work before beginning. using BlockSplosion as an example. and select the Utilities for Unity . Alternately. Project Settings (mobile only) The mobile Utilities package includes a Project Settings folder which provides default settings for a VR mobile application. see Migrating to Utilities from the Integration Package for important steps to take before importing the custom assets package. .unityPackage file in your file system and double-click to launch. From the Unity menu. leave all of the boxes checked and select Import.exe in Assets/OVR/Editor in addition to all other specified files.dll in Assets/Plugins/x86_64 and OculusUnityPatcher*. Otherwise. you can locate the ..* OVR.10 | Getting Started | Unity Folder Content to Delete *vrplatlib* Assets/Plugins/x86/ Oculus. When the Importing package dialog box opens. 2. To import the package into Unity. select Assets > Custom Package. Unity will reopen with the new project loaded. create a new project into which you will import the Oculus assets: 1. 5. you can locate the BlockSplosion. TimeWarp is always on and cannot be frozen. Replace any usage of OVRManager. Alternately. For details on implementing Unity's first-party VR support. Remove any usage of OvrCapi. If the Oculus Utilities package is imported into an old .instance. Instead of multisampling the back-buffer when VR is enabled. Unity multisamples the eye buffers. Please let us know about any issues you encounter in the Oculus Unity forums.antiAliasing.VR. For detailed instructions. 6. Importing Utilities Package into Legacy Projects The legacy Oculus Unity Integration used a separate Camera component on each eye anchor. see the Unity manual: http://docs. which will have the same effect. Upgrade Procedure 1.main or.leftEyeCamera or rightEyeCamera.com/ Manual/VROverview.nativeTextureScale with UnityEngine. Instead of calling GetComponent<Camera>(). see Importing the Oculus Utilities Package. Move any scripts...instance.unity3d. Remove any usage of OVRManager. Copy these files to your [Project]/Assets/ProjectSettings folder.eyeTextureAntiAliasing with UnityEngine. save your work before beginning. and keep your eye out for updates.instance. and select BlockSplosion. The CAPI C# binding is no longer available.VRSettings.VR.Unity | Getting Started | 11 If you are already working in a Unity project. Replace any usage of OVRManager. The import process may take a few minutes to complete. 4.1 is a substantial upgrade for VR development. for backward compatibility.timeWarp and OVRManager.cs.renderScale. delete all Oculus Integration content before importing the new Unity package. To import the Utilities package into Unity. or references from the Cameras on OVRCameraRig.QualitySettings. For more on which Unity versions correspond to which SDKs.instance. use Camera.GetNativePtr() to get an ovrHmd pointer and then pass it to a native plugin that uses the Oculus SDK corresponding to your Unity version. use OVRCameraRig. then virtual texture scaling will be used.VRDevice. There is always risk in moving early to a new major release that you may encounter problems related to VR performance or otherwise. Do not assume there are Cameras on OVRCameraRig. 2. see "Integration Versions" in Compatibility and Requirements. select Assets > Custom Package.unitypackage file and double-click to launch. then the native scale is increased and the virtual scale is set to 1. If you set renderScale to a value that is less than or equal to any value it has had since the application started.leftEyeAnchor or rightEyeAnchor.freezeTimeWarp. If you need to access CAPI.html Delete Previously-Imported Assets If you have previously imported a Unity integration package.unitypackage to import the assets into your new project. use UnityEngine.instance. 5. tags. image effects. Migrating to Utilities from the Integration Package Moving to Unity 5. If you increase it higher. Oculus Utilities for Unity uses single camera on the center eye anchor. The value of renderScale is equal to nativeTextureScale * virtualTextureScale.leftEyeAnchor and rightEyeAnchor to the one on centerEyeAnchor. and we recommend carefully choosing your time frame for making the update.virtualTextureScale or OVRManager. 3. Each sample application project includes a ProjectSettings folder which provides default settings for the VR mobile application. to a new maximum value. editor scripts will patch up old OVRCameraRig GameObjects and enable PlayerSettings. . Note: Don't forget to move any scripts.virtualRealitySupported. or references from the left and right eye anchors to the center eye anchor as noted above.12 | Getting Started | Unity project built with the legacy Unity integration. tags. so the project should work without further action. image effects. Materials Contains materials that are used for graphical components within the Utilities package. which enables scripts to communicate with the Xbox gamepad on Windows (both 32 and 64-bit versions). Prefabs. Note: We strongly recommend that developers not directly modify the included OVR scripts. Prefabs Contains the main Unity prefabs that are used to provide the VR support for a Unity scene: OVRCameraRig and OVRPlayerController. Textures Contains image assets that are required by some of the script components. It holds sub-folders with mobile equivalents of all top-level folders (Editor. and enhance several C# component scripts. Scripts Contains the C# files that are used to tie the VR framework and Unity components together. the supplied prefabs.Unity | A Detailed Look at Oculus Utilities for Unity | 13 A Detailed Look at Oculus Utilities for Unity This section examines the Utilities package. . such as the main GUI display.dll. The OVR directory contains the following subdirectories: Editor Contains scripts that add functionality to the Unity Editor. Plugins The Plugins folder contains the OVRGamepad. and several key C# scripts. Materials. including its directory structure. Contents OVR The contents of the OVR folder in OculusUtilities. Note: There may be minor differences between the contents of the Utilities packages provided for PC development and the version bundled with the mobile SDK. Moonlight Contains classes designed for Gear VR development. Many of these scripts work together within the various Prefabs. Scenes Contains sample scenes.unitypackage are uniquely named and should be safe to import into an existing project. Meshes Contains Meshes that are required by some OVR scripts. such as the TrackerBounds. et cetera). such as a character walking around. OVRCameraRig OVRCameraRig replaces the regular Unity Camera within a scene.14 | A Detailed Look at Oculus Utilities for Unity | Unity This folder also contains the plugin for Mac OS: OVRGamepad.bundle.cs • OVRManager. The rig is meant to be attached to a moving object. You can drag an OVRCameraRig into your scene and you will be able to start viewing the scene with the Gear VR and Rift. a gun turret. two “anchor” GameObjects for the left and right eyes. Prefabs The current integration for adding VR support into Unity applications is based on two prefabs that may be added into a scene: • OVRCameraRig • OVRPlayerController To use. the pose of which is controlled by head tracking. simply drag and drop one of the prefabs into your scene. The following scripts (components) are attached to the OVRCameraRig prefab: • OVRCameraRig. Note: Make sure to turn off any other Camera in the scene to ensure that OVRCameraRig is the only one being used. Figure 1: OVRCameraRig and OVRManager OVRCameraRig contains one Unity camera. This replaces the conventional Camera. and one “tracking space” GameObject that allows you to fine-tune the relationship between the head tracking reference frame and your world. et cetera. a car.cs . It includes a physics capsule. It is basically an OVRCameraRig prefab attached to a simple character controller. or a keyboard and mouse. To use.Unity | A Detailed Look at Oculus Utilities for Unity | 15 OVRPlayerController The OVRPlayerController is the easiest way to start navigating a virtual environment. a simple menu system with stereo rendering of text fields.cs Figure 2: OVRPlayerController . a movement system. drag the player controller into an environment and begin moving around using a gamepad. Note: Make sure that collision detection is active in the environment.cs • OVRGamepadController. Two scripts (components) are attached to the OVRPlayerController prefab: • OVRPlayerController. and a cross-hair component. It is a singleton that exposes the Oculus SDK to Unity.16 | A Detailed Look at Oculus Utilities for Unity | Unity Unity Components The following section gives a general overview of what each of the scripts within the Scripts folder does. because there are public members that allow for changing certain values in the Unity inspector. GameObject Structure TrackingSpace A GameObject that defines the reference frame used by tracking. and includes helper functions that use the stored Oculus variables to help configure camera behavior. Not supported on all platforms. To fully ignore tracking or otherwise modify tracking behavior. Important: All camera control should be done through this component. as well as a virtual "center" eye that is halfway between them. This component is added to the OVRCameraRig prefab. This is attached to a prefab that makes it easy to add comfortable VR support to a scene. Table 2: PC-Only Public Members Use Position Tracking Disables the IR sensor and causes head position to be inferred from the current rotation using the head model. This component is the main interface between Unity and the cameras.cs contains the following public members: Table 1: Mobile and PC Public Members Monoscopic If true.UpdatedAnchors above . OVRManager. Mobile and PC Public Members Updated Anchors Allows clients to filter the poses set by tracking. For example. OVRManager OVRManager is the main interface to the VR hardware. OVRPlayerController changes the position and rotation of TrackingSpace to make the character controller follow the yaw of the current head pose. However. OVRCameraRig OVRCameraRig is a component that controls stereo rendering and head tracking. rendering will try to optimize for a single viewpoint rather than rendering once for each eye. it should only be declared once. It can be part of any application object. You should understand this script when implementing your own camera control mechanism. It maintains three child "anchor" Transforms at the poses of the left and right eyes. You can move this relative to the OVRCameraRig for use cases in which the rig needs to respond to IR sensor input. see OVRCameraRig. Used to modify or ignore positional tracking. OVRDisplay Provides the pose and rendering state of the HMD. the gamepad must be XInput-compliant. OVRTracker Provides the pose. This is especially useful when positional tracking is activated. Dampening (how fast a player will decrease speed when movement input is not activated). When HMD Rotates Y is set. This includes Acceleration (how fast the player will increase speed). frustum. as well as keep magnetometer settings intact. The OVRPlayerController prefab has an empty GameObject attached to it called ForwardDirection. Helper Classes In addition to the above components. OVRPlayerController contains a few variables attached to sliders that change the physics properties of the controller. To use the Xbox controller on a Mac. OVRGridCube OVRGridCube is a helper class that shows a grid of cubes when activated.asset in your project. OVRTrackerBounds Warns players when the HMD moves outside the trackable range. It is attached to the OVRPlayerController prefab. This GameObject contains the matrix which motor control bases it direction on. Back and Side Dampen (how much to reduce side and back Acceleration). The cubes will change color to red when positional data is available. This will keep the sensor orientation the same from scene to scene. When turned off. OVRGamepadController OVRGamepadController is an interface class to a gamepad controller. On Windows systems. your scripts can always access the HMD state via static members of OVRManager. The controller will interact properly with a Unity scene. install the TattieBogle driver. Utilities OVRPlayerController OVRPlayerController implements a basic first-person controller for the VR framework. the actual Y rotation of the cameras will set the Y rotation value of the parent transform that it is attached to. It is crossplatform and works on the Samsung EI-GP20 Gamepad for Android if you include InputManager. and tracking status of the infrared tracking camera. Rotation Amount (the amount in degrees per frame to rotate the user in the Y axis) and Gravity Modifier (how fast to accelerate player down when in the air). or change back to blue if vision is lost. This GameObject should also house the body geometry which will be seen by the player. Its main purpose is to be used as a way to know where the ideal center of location is for the user's eye position. . which has an OVRCameraRig attached to it.Unity | A Detailed Look at Oculus Utilities for Unity | 17 Reset Tracker On Load This value defaults to True. subsequent scene loads will not reset the sensor. and will remain blue if position tracking is not available. provided that the scene has collision detection assigned to it. select Platform: Game Engines from our Downloads page here: https://developer. Note: If you don't replace the ProjectSettings folder. This GameObject should also house the body geometry which will be seen by the player. and select SDKExamples. imported scenes will show console errors. To download. Then select Assets >Import Package > Custom Package.18 | A Detailed Look at Oculus Utilities for Unity | Unity GameObject Structure ForwardDirection An empty GameObject attached to the OVRPlayerController prefab containing the matrix upon which motor control bases its direction.com/ downloads/ To import SDKExamples into Unity. Once imported.unityPackage to import the assets into your project. .unityPackage and double-click to launch.. You will find the following sample scenes located in Assets/Scenes: Trivial An empty scene with one cube and a plain Unity camera. begin by creating a new. which will have the same effect. Alternately..oculus. replace your Unity project's ProjectSettings folder with the ProjectSettings folder included with SDKExamples. you can locate the SDKExamples. empty project. See TrackingSpace in “OVRCameraRig” for more information Oculus Mobile SDK Examples The SDK Examples project demonstrates useful scenarios and functionality. Additionally implements a Wait Timer for displaying Long Press Time.cs Drop-in component for toggling Monoscopic rendering on and off for Android.cs Helper component for detecting Back Key long-press to bring-up the Universal Menu and Back Key short-press to bring up the Confirm-Quit to Home Menu. OVRChromaticAberration. TimeWarp30HzSample. MoviePlayerSample. HomeBattery. OVRMonoscopic.cs Example code which provides button commands (used in conjunction with HomeMenu. The example scripts are located in Assets/OVR/Moonlight/: Crosshair3D.cs Example code and documentation for how to play an in-game video on a textured quad using Android MediaPlayer (mobile) or Unity's native media rendering (PC).cs Example code for setting up TimeWarp to support 30Hz apps as well as toggling Chromatic Aberration Correction and Monoscopic Rendering on and off.cs). OVRDebugGraph. please review Interface Guidelines and Universal Menu in the Mobile SDK documentation.cs Detailed code for how to create judder-free crosshairs tied to the camera view. HomeButton. Information regarding the TimeWarp Debug Graph may be found in the TimeWarp technical note in the Mobile SDK documentation. OVRWaitCursor. HomeMenu. OVRResetOrientation. StartupSample.cs Drop-in component for resetting the camera orientation.Unity | A Detailed Look at Oculus Utilities for Unity | 19 Room A cubic room formed from six cubes enclosing an OVRPlayerController.cs Drop-in component for toggling the TimeWarp debug graph on and off. Cubes A 3D array of cubes and an OVRCameraRig.csDrop-in component for toggling chromatic aberration correction on and off for Android.cs Helper component for auto-rotating a wait cursor. OVRPlatformMenu.cs Example code for an animated menu. For more information on interface guidelines and requirements.cs Example code for de-clocking your application to reduce power and thermal load as well as how to query the current power level state. OVRModeParms.cs Example code for loading a minimal-scene on startup while loading the main scene in the background.cs Example code for using the SDK Battery Level API and interactively modifying a visual indicator. Note: libOculusMediaSurface currently works with GLES2 only. . and GetUp().display. which return a Vector3 and Quaternion. Note: The term Touch in OVRInput refers to actual Oculus Touch controllers.unity3d.com/Manual/Input. and may be used for rendering hands or objects in the 3D world.1. and is currently included for legacy use with our deprecated OVRGamepadController and OVRInputControl APIs. respectively. see the OVRInput reference. For more information on Unity’s input system and Input Manager. OVRInput exposes a unified input API for multiple controller types.20 | OVRInput | Unity OVRInput Note: OVRInput is now our supported API for PC and Mobile input handling. When used with tracked controllers such as Oculus Touch.3. It currently supports the Oculus Touch and Microsoft Xbox controllers on desktop platforms. must be Android compatible and support Bluetooth 3. thumbsticks. see System and Hardware Requirements in our Mobile SDK documentation. • GetDown() queries if a control was pressed this frame. such as the Samsung EI-GP20 and Moga Pro. GetDown().com/ ScriptReference/Input.html and http://docs. For example. For more details on supported mobile gamepad features. Control Input Enumerations There are multiple variations of Get() that provide access to different sets of controls. • Get() queries the current state of a control. similar to the head and eye poses. and capacitive touch data.asset file previously provided to populate input bindings for mobile was deprecated with Utilities 0. For keyboard and mouse control.html. • GetUp() queries if a control was released this frame. For more information. documented here: http://docs.asset if they do not already exist. These poses are reported in the same coordinate frame as the headset. triggers. The InputManager. Gamepads compatible with Samsung Gear VR.RecenterPose(). we recommend using the UnityEngine. It may be used to query virtual or raw controller state. SetControllerVibration() sets vibration frequency and amplitude. OVRInput Usage The primary usage of OVRInput is to access controller input state through Get(). OVRInputControl and OVRGamepadController are now deprecated and will be removed in a later version. OVRInput provides control of haptic vibration feedback on compatible controllers.0. These sets of controls are exposed through enumerations defined by OVRInput as follows: . They are also reset by OVRManager.Input scripting API (see Unity’s Input scripting reference for more information). OVRInput also provides position and orientation data through GetLocalControllerPosition() and GetLocalControllerRotation(). Controller poses are returned by the Constellation tracking system and are predicted simultaneously with the headset. Mobile input bindings are now automatically added to InputManager. such as buttons.unity3d. relative to the initial center eye pose.0. These distinct states can be used to accurately detect the user’s interaction with the controller and enable a variety of control schemes. OVRInput. Button. the NearTouch for that control will report false. Touch. We recommend using the first set of enumerations. as demonstrated below.NearTouch Proximity-sensitive control surfaces found on the Oculus Touch controllers. OVRInput. More on Controls Example Usage: // returns true if the primary button (typically “A”) is currently pressed.Touch Capacitive-sensitive control surfaces found on the Oculus Touch controllers.RawNearTouch OVRInput.Button Traditional buttons found on gamepads and the Oculus Touch controllers. and NearTouch In addition to traditional gamepad buttons. OVRInput. OVRInput.Axis2D Two-dimensional controls such as thumbsticks that report a Vector2 state.Axis1D One-dimensional controls such as triggers that report a floating point state. the Oculus Touch controllers feature capacitive-sensitive control surfaces which detect when fingers make physical contact (a “touch”). When the user pushes the index trigger down. A secondary set of enumerations mirror the first. When the user makes physical contact. since the virtual mapping provides useful functionality. the Touch for that control will report true.Get(OVRInput. The second set of enumerations provides raw unmodified access to the underlying state of the controllers.Button. defined as follows: OVRInput. As the user’s finger approaches the control and gets within close proximity to it. For example. OVRInput.Unity | OVRInput | 21 Control Enumerates OVRInput.RawButton OVRInput.RawAxis1D OVRInput.One). as well as when they are in close proximity (a “near touch”). the NearTouch will report true prior to the user making physical contact. the Button for that control will report true.RawTouch OVRInput. .RawAxis2D The first set of enumerations provides a virtualized input mapping that is intended to assist developers with creating control schemes that work across different types of controllers. if a user’s index finger is fully removed from a control surface. This allows for detecting several distinct states of a user’s interaction with a specific control surface. OVRInput. OVRInput.GetDown(OVRInput. OVRInput. see the OVRInput reference). // returns a float of the Hand Trigger’s current state on the Right Oculus Touch controller. a user may use a pair of Oculus Touch controllers. // returns true if the secondary gamepad button. Specifying a controller can be used if a particular control scheme is intended only for a certain controller type. OVRInput. the default is to use the Active controller.GetUp(OVRInput. // returns true if the “X” button was released this frame.0f) OVRInput.Controller. OVRInput.0f to 1.Button. // (range of 0.Get(OVRInput.Touch).Get(OVRInput. // (Interpret the trigger as a button). OVRInput. OVRInput.0f to 1.SecondaryIndexTrigger). in which case the Active controller will switch to the Xbox controller once the user provides input with it.22 | OVRInput | Unity // returns true if the primary button (typically “A”) was pressed this frame.Axis1D. OVRInput.Touch). In addition to specifying a control. Example Usage: // returns a float of the Hand Trigger’s current state on the Left Oculus Touch controller. // (range of 0. OVRInput.Get(OVRInput. . This is significant because specifying LTouch or RTouch uses a different set of virtual input mappings that allow more convenient development of hand-agnostic input code.Get(OVRInput. OVRInput. OVRInput.Get(OVRInput. // returns a Vector2 of the primary (typically the Left) thumbstick’s current state.Axis1D.GetConnectedControllers().Axis1D.Button. If no controller parameter is provided to Get().One).X).Axis1D.PrimaryHandTrigger. OVRInput.Controller. The current Active controller can be queried with OVRInput. is currently touched by the user.LIndexTrigger). // returns true if the primary thumbstick has been moved upwards more than halfway. // returns a float of the secondary (typically the Right) index finger trigger’s current state. The list of supported controllers is defined by the OVRInput.PrimaryThumbstick). For example. Note that the Oculus Touch controllers may be specified either as the combined pair (with OVRInput.Get(OVRInput.Get(OVRInput.Button.PrimaryThumbstickUp).0f) OVRInput. Get() also takes an optional controller parameter.Interpret the thumbstick as a D-pad).0f to 1.DpadUp. or individually (with OVRInput.Touch.Controller.Controller.Two). // returns true if the left index finger trigger has been pressed more than halfway.Gamepad).SecondaryHandTrigger.LIndexTrigger).RawButton.Controller.Get(OVRInput.LTouch). // returns a float of the left index finger trigger’s current state. typically “B”.PrimaryHandTrigger.Button.RTouch).Get(OVRInput.Get(OVRInput.GetActiveController() and a bitmask of all the connected Controllers can be queried with OVRInput.Get(OVRInput.RawButton.PrimaryHandTrigger.RawAxis1D. // returns a float of the Hand Trigger’s current state on the Right Oculus Touch controller. // (X/Y range of -1.Axis1D.Controller.Controller enumeration (for details. // returns true if the primary thumbstick is currently pressed (clicked as a button) OVRInput. and pick up an Xbox controller. // returns a float of the Hand Trigger’s current state on the Left Oculus Touch controller. Example Usage: // returns true if the Xbox controller’s D-pad is pressed up.LTouch and RTouch).0f) OVRInput.Controller. OVRInput. which corresponds to the controller that most recently reported user input. OVRInput. set them down. OVRInput.Get(OVRInput. // (Up/Down/Left/Right .Touch).Axis2D. See the virtual mapping diagrams in Touch Input Mapping for an illustration.PrimaryThumbstick). OVRInput. … // returns a float of the Hand Trigger’s current state on the Oculus Touch controller // specified by the controller variable. This is convenient since it avoids the common pattern of if/else checks for Left/Right hand input mappings. For more information on additional mappings that are available.One. Touch Input Mapping The following diagrams illustrate common input mappings for Oculus Touch controllers. controller).Axis1D. .RTouch. refer to the OVRInput reference. and Button.Controller. Example Usage: // public variable that can be set to LTouch or RTouch in the Unity Inspector public Controller controller.Button. For example. such as on a public variable in the Unity Editor. the virtual mapping changes to allow for hand-agnostic input bindings.LTouch or OVRInput.One will be mapped appropriately to either the A or X button. Virtual Mapping (Accessed as Individual Controllers) When accessing the Left or Right Touch controllers individually with OVRInput.Controller.Get(OVRInput. Virtual Mapping (Accessed as a Combined Controller) When accessing the Touch controllers as a combined pair with OVRInput. controller). the same script can dynamically query the Left or Right Touch controller depending on which hand it is attached to.Unity | OVRInput | 23 This can be taken a step further to allow the same code to be used for either hand by specifying the controller in a variable that is set externally.Get(OVRInput.Touch. the virtual mapping closely matches the layout of a typical gamepad split across the Left and Right hands.Controller. OVRInput.PrimaryHandTrigger. // returns true if the primary button (“A” or “X”) is pressed on the Oculus Touch controller // specified by the controller variable. Controller. Xbox Input Handling Virtual Mapping This diagram shows a common implementation of Xbox controller input bindings using OVRInput. The layout of the Touch controllers closely matches the layout of a typical gamepad split across the Left and Right hands.Gamepad.24 | OVRInput | Unity Raw Mapping The raw mapping directly exposes the Touch controllers. . Unity | OVRInput | 25 Raw Mapping The raw mapping directly exposes the Xbox controller. . PC Build Target: Microsoft Windows and Mac OS X This section describes targeting Unity project builds to Microsoft Windows and Mac OS X. Build Settings and Player Settings To build the demo as a standalone full screen application. Build Settings Click on File > Build Settings. and select one of the following: For Windows... set Target Platform to Windows and set Architecture to either x86 or x86 64. you will need to change a few project settings to maximize the fidelity of the demo. Figure 3: Build Settings: PC .26 | Configuring for Build | Unity Configuring for Build This section describes building your project to PC and mobile targets. Figure 4: Build Settings: Mac Note: Be sure to add any scenes you wish to include in your build to Scenes In Build.Unity | Configuring for Build | 27 For Mac. . set Target Platform to Mac OS X.. . If prompted. select Virtual Reality Supported. Quality Settings You may notice that the graphical fidelity is not as high as the pre-built demo. the demo should start to run in full screen mode as a standalone application. In the Other Settings frame. select Build. All additional required settings are enforced automatically.28 | Configuring for Build | Unity Player Settings Within the Build Settings pop-up. If you are building in the same OS. You will need to change some additional project settings to get a better looking scene. Figure 5: Player Settings In the Build Settings pop-up. click Player Settings. specify a name and location for the build. Set the values in this menu to the following: Figure 6: Quality settings for Oculus demo The most important value to modify is Anti-aliasing. Mobile Build Target: Android This section describes targeting Unity project builds to Android. Do not add the noHistory attribute to your manifest. Running the Build Now that the project is properly configured for VR.Unity | Configuring for Build | 29 Navigate to Edit > Project Settings > Quality. will not be modified. vr_only. Now rebuild the project again. and the quality should be at the same level as the pre-built demo. PC builds create a single executable file that may be used in either Direct Display or Extended Display modes. Android Manifest The manifests of projects built with Unity's first-party VR support enabled are automatically updated during build to meet our requirements (landscape orientation. and 8x usually isn't worth it. . An anti-aliasing value of 2X is ideal 4x may be used if you have performance to spare. such as Entitlement Check settings. which reduces the effective horizontal resolution by 50%. All other values. The anti-aliasing must be increased to compensate for the stereo rendering. it’s time to install and run the application. et cetera). Do not add the noHistory attribute to your manifest. In the Other Settings frame. select Virtual Reality Supported. but you may wish to make . select Android as the platform. Player Settings 1. Set Texture Compression to ASTC.30 | Configuring for Build | Unity Build Settings From the File menu. From the Build Settings… menu. select Build Settings…. Click the Player Settings… button and select the Android tab. All required settings are enforced automatically. Instead. add the Main. Running the Build Now that the project is properly configured for VR.apk will be installed and launched on your Android device. and insert the phone into the Gear VR when instructed to do so. While in the Build Settings menu. Note: Custom Splash Screen support is not available with Unity Personal edition. connect now. you build the application directly to your phone. such as enabling Multithreaded Rendering and setting Graphics APIs to OpenGLES3. To run the application in the future. it’s time to install and run the application on the Android device. Copy an Oculus Signature File specific to your mobile device to the folder <project>/Assets/Plugins/ Android/assets/ or the application will not run. go ahead and create it. launch the application directly on the phone. 1. Be sure the project settings from the steps above are saved with File > Save Project. verify that Android is selected as your Target Platform and select Build and Run. 4. If asked.Unity | Configuring for Build | 31 additional settings as appropriate. select Build Settings…. specify a name and location for the . Unlock the phone lock screen. See "Create Your Signature Files" in the Oculus Mobile Submission Guidelines for more information. If this folder does not exist. Applications written for development are not launched through the Oculus Home menu system. 3. 2. . Select the Splash Image section. Figure 7: Player Settings 2. If you are not already connected to your phone via USB. For Mobile Splash image. Next.apk. and will be instructed to insert your phone into the Gear VR headset to launch the application automatically.scene to Scenes in Build. choose a solid black texture. From the File menu. remove your phone from the Gear VR headset. The . An example of how to do this during application start up is demonstrated in the SDKExamples Startup_Sample scene: • • • • Solid black splash image is shown for the minimum time possible. . the start scene transitions to the main scene using a fade.g. A small test scene with 3D logo and 3D rotating widget or progress meter is immediately loaded. Good performance is critical for all VR applications. No shadow buffers. multi-camera setups. static geometry.32 | Best Practices: Mobile | Unity Best Practices: Mobile This section provides simple guidelines to help your Android Unity app perform well. More information about application menu options and access can be found in Universal Menu in the Mobile SDK documentation. While the small start up scene is active. all graphics should be rendered such that the user is always viewing a proper threedimensional stereoscopic image. No dynamic lighting. ambient occlusion. E. Best Practices • • • • • • Be Batch Friendly. Bake as much detail into the textures as possible. Universal Menu Handling Applications will need to handle the Back Key long-press action which launches the Universal Menu as well as the Back Key short-press action which launches the “Confirm-Quit to Home” Menu which exits the current application and returns to the Oculus Home application. specular reflections. the main scene is loaded in the background. no post effects. Prefer lightprobes instead of dynamic lighting for characters and moving objects. Additionally. head-tracking must be maintained at all times. Share materials and use a texture atlas when possible. Please review “Performance Advice for Early Titles” in Design Guidelines and Mobile VR Design and Performance Guidelines before reading this documentation . Start up Sequence For good VR experiences. Only render one view per eye. but the limitations inherent to mobile development warrant special consideration. An example of demonstrating this functionality is in the SDKExamples GlobalMenu_Sample scene. reflections. don’t use grabpass in a shader. Prefer lightmapped. et cetera. Keep the number of rendering passes to a minimum.they may be found in the Mobile SDK documentation. Design Considerations Please review Design Guidelines in the Mobile SDK documentation if you have not already done so. don't resolve buffers. et cetera. Once the main scene is fully loaded.. Alpha-testing incurs a high performance overhead. • • • • Keep draw calls down. • Cache frequently-used components and transforms to avoid lookups each frame. • Identify and eliminate Garbage Collection allocations that occur each frame. In current versions of Unity. Be mindful of texture usage and bandwidth. • Use Texture Compression. • Do not enable gyro or the accelerometer. You will generally have plenty of memory. Reduce or eliminate physics simulations when they are not actually needed. Keep geometric complexity to a minimum. • Use the Unity Profiler to: • Identify expensive code and optimize as needed. • Check the Disable Depth and Stencil* checkbox in the Resolution and Presentation pane in Player Settings. careful consideration must be given to how features are implemented. Replace with alpha-blended if possible. • Keep alpha blended transparency to a minimum. as the latter allocate a GameObject and destroy it when the sound is done playing. Use object pools to respawn frequently-used effects or objects instead of allocating new ones at runtime. • Avoid expensive mathematical operations whenever possible. Favor ASTC.Unity | Best Practices: Mobile | 33 • Avoid alpha tested / pixel discard transparency. • • • • • • Be mindful of the total number of GameObjects and components your scenes use. the most important thing to keep in mind is to be conservative on performance from the start. • All best practices for mobile app and game development generally apply. . Model your game data and objects efficiently. Use pooled AudioSources versus PlayOneShot sounds. Note: The Unity Profiler is not available for Unity Free. Minimize the number of objects that actually perform calculations in Update() or FixedUpdate(). these features trigger calls to expensive display calls. Be mindful of fillrate. • Identify and eliminate any spikes in performance during normal play. General CPU Optimizations To create a VR application or game that performs well. Scene should always run at 60 FPS. and you should avoid any hitching or laggy performance during any point that the player is in your game. • Do not use Unity’s OnGUI() calls. Rendering Optimization While building your app. 34 | Best Practices: Mobile | Unity Reducing Draw Calls Keep the total number of draw calls to a minimum. There are two types of draw call batching: Static and Dynamic. Static batching is used for objects that will not move. We have a lot of texture memory. More information about the Occlusion Culling system can be found here: http://blogs.unity3d. or not using multipass shaders. • Framebuffer Format: Most scenes should be built to work with a 16 bit depth buffer resolution. Anisotropic filtering may be used as well. Dynamic batching is used for moving objects and is applied automatically when objects meet certain criteria. . More information on dynamic batching criteria may be found here: https://docs. This may be useful for culling small objects that do not contribute to the scene when viewed from a given distance. • Screen Resolution: Setting Screen. Unity provides several built-in features to help reduce draw calls such as batching and culling. Draw Call Batching Unity attempts to combine objects at runtime and draw them in a single draw call. and it is pretty much free from a performance standpoint. such as sharing the same material.unity3d. not using real-time shadows.com/Documentation/Manual/ DrawCallBatching. More information about how to set up culling distances may be found here: https://docs. select the Static checkbox in the object Inspector. It does have a performance cost. A conservative target would be less than 100 draw calls per frame.com/2013/12/02/occlusion-culling-inunity-4-3-the-basics/. switch Texture Type to Advanced in the texture inspector.com/ Documentation/ScriptReference/Camera-layerCullDistances. • Texture Filtering: Trilinear filtering is often a good idea for VR.Resolution to a lower resolution may provide a sizeable speedup for most Unity apps. Additionally. but it is worth it. but keep it to a single anisotropic texture lookup per fragment. rotate or scale. Fortunately. To mark an object static.g.” and Occlusion Culling may be overkill for modest scenes. • Texture Mipmaps: Always use mipmaps for in-game textures. The advice to early VR titles is to favor modest “scenes” instead of “open worlds. To see the available mipmapping options. You can often reduce the size of these textures with no appreciable difference. e. This helps reduce overhead on the CPU. Unity also has an integrated Occlusion Culling system. if your world is mostly pre-lit to compressed textures.unity3d. That said. and must be set explicitly per object.. a 16 bit color buffer may be used.html Culling Unity offers the ability to set manual per-layer culling distances on the camera via Per-Layer Cull Distance. Reducing Memory Bandwidth • Texture Compression: Texture compression offers a significant performance benefit. • Texture Sizes: Favor texture detail over geometric detail. use high-resolution textures over more triangles. textures from the Asset Store often come at resolutions which are wasteful for mobile. Favor ASTC compressed texture formats. Unity automatically generates mipmaps for textures on import.html. For steps on how to set up remote profiling for your device.Unity | Best Practices: Mobile | 35 Reduce Geometric Complexity Keep geometric complexity to a minimum. Unity Profiler Unity comes with a built-in profiler. The more GameObjects and Renderers in the scene. which can be used to help identify bottlenecks. bake specular highlights into the texture to avoid having to compute the highlight in the fragment shader. Unity Pro provides a built-in Level of Detail System (not available in Unity Free). objects in the transparent queue are rendered in a back to front order without depth testing and are subject to overdraw. For additional profiling tools. favor the Mobile or Unlit version of the shader. And. .. The profiler provides per-frame performance metrics. please refer to the Android section of the following Unity documentation: https://docs. The next section details the various tools provided by Unity to help you diagnose bottlenecks in Android applications.com/430/Documentation/Manual/iphone-PracticalRenderingOptimizations. Avoid overlapping alpha-blended geometry (e. when using built-in shaders. And. However. the more memory consumed and the longer it will take Unity to cull and render your scene.html. You may profile your application as it is running on your Android device using adb or WIFI. 50. For example. favor the Mobile or Unlit version of the shader. assets from the Asset Store are high-fidelity and will need tuning for mobile.unity3d. Bake as much detail into the textures as possible to reduce the computation per vertex: https:// docs.html Be mindful of GameObject counts when constructing your scenes.000 static triangles per-eye per-view is a conservative target. when using built-in shaders. allowing lower-resolution meshes to be displayed when an object is viewed from a certain distance.com/Documentation/Manual/Profiler. see the following: https://docs. Reduce Pixel Complexity and Overdraw Pixel Complexity: Reduce per-pixel calculations by baking as much detail into the textures as possible.unity3d. Overdraw: Objects in the Unity opaque queue are rendered in front to back order using depth-testing to minimize overdraw. Typically. Verify your fragment shaders are mobile friendly.g. dense particle effects) and full-screen post processing effects. you may find you are not hitting a solid 60 FPS. Verify model vert counts are mobile-friendly. see "Performance Analysis" in the Mobile SDK documentation. For more information on how to set up a LODGroup for a model.html Verify your vertex shaders are mobile friendly.com/Documentation/Manual/ LevelOfDetail. Unity Profiling Tools Even following the guidelines above.unity3d. such as FPS. GarbageCollector. Tri and Vert Counts. Show Rendering Statistics Unity provides an option to display real-time rendering statistics. . Memory Usage (including a breakdown of per-object type memory usage). pressing the Stats button (circled in red in the upper-right of the following screenshot) above the view window will display an overlay showing real-time render statistics. While in the Game View. select OverDraw in the drop-down Render Mode selection box. If your app isn’t performing as expected. Draw Calls. you may need to gather information on what the entire system is doing. GPU Usage data for Android is not available at this time. Show GPU Overdraw Unity provides a specific render mode for viewing overdraw in a scene. translucent colors will accumulate providing an overdraw “heat map” where more saturated colors represent areas with the most overdraw. It also provides detailed information regarding Rendering Statistics. and Vsync. Scripts. In this mode. The Unity profiler only displays performance metrics for your application.36 | Best Practices: Mobile | Unity The Unity Profiler displays CPU utilization for the following categories: Rendering. Audio and Physics Simulation statistics. From the Scene View Control Bar. VRAM usage. Physics. Unity | Best Practices: Mobile | 37 . 38 | Troubleshooting and Known Issues | Unity Troubleshooting and Known Issues This section outlines some currently known issues with the Oculus Unity Integration and the Oculus Utilities for Unity.0.1. and that you have installed the Oculus runtime.1. Utilities 0.0.0. scenes that take < 3 ms to render) may show 2-3 ms higher latency with Integration 0.6.see Compatibility and Requirements for more details.3p1] Mac will not vsync properly for now.1 and earlier are not compatible with Oculus Runtime for Windows 0.1. Unity 5 is known to import ETC2-compressed assets very slowly. [Unity 5. Verify that you are using a compatible runtime . [Unity 5 with Mobile SDK 0.1. the back button becomes stuck in the "down" state. PC Legacy Integration 0.0.0.1. Ensure you have administrator rights to the system where you are installing the integration.0 Beta].8.2p2] This is a known issue.6.1.2] Simple scenes (e.0.6. Slight increase in rendering latency for trivial scenes.1.g. No VR support for Editor Game View [Legacy Integration packages with Unity versions prior to 4.0 . 0. [Integration 0.6.6. Unity 5 hangs while importing assets from SDKExamples [SDKExamples 0. If the user wants to go immediately back to the System Activities from the app.0. General Issues When switching between a mobile application and System Activities screen. Rift apps run in a window and are mirrored to the Rift in Direct Display mode.7p4] Fixed in Unity 4.6.1p2] Linear lighting and MSAA are broken with VR.2. they will need to press and hold the back button longer than 0.6.1.5.0.7.75 seconds.1. Verify that the HMD is plugged in and working normally. Integration 0.0. Also verify that you have not selected D3D 9 or Windows GL as the renderer (Legacy Integration only).6. The app does not launch as a VR app. See Compatibility and Requirements for recommended Unity versions.0] Unity Editor crashes in Game View when VR is enabled. [Utilities 0.2. fixed since Integration 0.6. [Legacy Integration 0.. [Unity 5.2.0] A current workaround is to send an artificial back-button-up event on resume.6.1. random textures appear frozen full-screen instead of the eye buffer [Unity 5.0.6. D3D log errors about texture.2p3-5.0 Beta] . 0. Typical scenes take > 5 ms to render and should be unaffected. [Integration 0. the internal OVRShimLoader script forces your builds to 1920x1080 full-screen resolution and suppresses Unity's startup splash screen by default.6.1] Fixed in Legacy Integration 0.6. Fixed as of Legacy Integration 0.exe>.4.1. Before updating your runtime. [Unity 4 with Oculus Runtime for OS X 0.6.0.4.2.0f2 and up. update to Oculus Runtime for OS X 0. > Oculus VR and uncheck the Optimize Builds for Rift box..exe) by holding the ALT key immediately after launch..0. be sure to run uninstall.1] If you have Team Licensing and Perforce Integration enabled.2 using Utilities 0.0.0. 5.0. navigate to Edit Preferences.4 and Legacy Integration 0.6. The app does not launch as a VR app. .0)] Editor preview and standalone players do not vsync properly. The Rift displays a black screen while using Unity Editor. In older versions.0. Mac standalone player crashes.0.6.1] Check the [Project Path]/Assets/Plugins/ folder and make sure that the Oculus plugins have not moved.app (found in /Applications/Oculus/) to remove your previous installation.1.0.6.6.0. [Integration 0. See the Unity console for additional information. Integration 0. Display settings forced to 1920x1080.0.0. OS X Mac Tearing [All first-party Unity VR in 5. you may need to check out the OVR and Plugins folders manually before importing the updated Unity package. You can still access it and change the settings when running your executable (<AppName. Unity startup splash suppressed. resulting in a vertical tear and/or judder on DK2.2. This issue has been fixed in Unity 5.1] Use Extended Display mode instead of Direct Display mode. [Integration 0. To disable this behavior. even if built on a Mac.6.Unity | Troubleshooting and Known Issues | 39 You can disable this behavior by turning off OVRManager.6.6.7p3 and up. Mobile Audio corruption with Android low-latency audio path.2.0.6.2 or 0.0b4 and up.0.5.6. Unity is aware of the issue and is working on a fix for all versions.mirrorToMainWindow. Integration 0. Integration 0. Android players are unaffected.0-5.6. Unity Editor crashes when building APK or pressing play in Play View.6.0.] To enable Rift support. [Unity 4. See "Direct Mode Display Driver" in Preparing for Development: PC SDK for more information.7p2. Integration 0.1.1.6.1p4 .0. Symptoms include sampling problems resulting in hitching and garbled playback speeds that do not affect pitch. Fixed Unity 4. Issues with updating to the latest Oculus Unity Integration with Team Licensing and Perforce Integration enabled.0. [Integration 0.1. Game scene is missing or just renders the background color when pressing Play in Unity.1.] This sporadic issue affects some developers using Unity versions built on Android’s low-latency audio path handling. oculus.40 | Troubleshooting and Known Issues | Unity Verify that you have selected Virtual Reality Enabled in Player Settings. .com Our Support Center can be accessed at https://support.com. Contact Information Questions? Visit our developer support forums at https://developer.oculus. you should be able to communicate with your Samsung phone via USB. GameObjects. Build the Unity Roll-a-ball application. 2.com/Manual/ index. By the time you have completed this process.com/learn/tutorials/projects/roll-a-ball The development process is covered in eight short video tutorials which run from around five to fifteen minutes in length. this process should take a few hours to complete. and scenes.Unity | Tutorial: Build a Simple VR Unity Game | 41 Tutorial: Build a Simple VR Unity Game This tutorial describes the steps necessary to build. Mobile: Download and install the Oculus Mobile SDK from Oculus Mobile SDK Downloads. Prepare for development as described by the Mobile SDK Setup Guide. You may wish to make a note of it .1. the phone will return its device ID. you should be able to run the Demo Scene as described in that guide. Download and install Unity Personal or Professional v 5. in which you use the keyboard or gamepad to control a ball that rolls around a game board and picks up floating token counters:http:// unity3d. load. By the time you have completed this process. It is intended to serve as a basic introduction for developers who are new to VR development and to Unity. optional for Desktop) PC running Windows 7/8 or a Mac running OS X 10 Unity 5 (see Compatibility and Requirements for specific ) You will also need to refer to the relevant Oculus SDK documentation. By the end. Install Unity. to the amazement of your friends and loved ones. Once the necessary tools are set up.0p2 or later here: http://docs. You may wish to begin by reviewing their documentation to gain a basic familiarity with core concepts such as the Editor. The game is controllable by keyboard or by the Samsung EI-GP20 gamepad. Requirements • • • • Oculus DK2 (Desktop) or Gear VR with compatible Samsung phone (Mobile) Samsung EI-GP20 gamepad (required for Mobile. projects. prefabs.html.you will need it later to request a Oculus Signature File (see step four in Modify Roll-a-ball for VR for more information). Unity provides a number of video tutorials that walk you through the process of creating a simple game. available for download here: https:// developer.oculus. Install the appropriate Oculus SDK and prepare for development. We will build and modify the Unity game Roll-a-ball to add VR capability. you will have a working mobile application that you can play and demonstrate on your Oculus Rift or Gear VR device. Allow for a few hours to complete the procedure. If you are communicating successfully. Desktop: Download and install the Oculus PC SDK and Utilities package from Oculus PC SDK Downloads. To verify this. Unity provides extensive documentation to introduce users to the environment. The first in the series provides instructions for creating the Roll-a-ball application. and run a simple Unity 3D application on the Oculus Rift or Samsung Gear VR. .unity3d. 3. retrieve the device ID from your phone by connecting via USB and sending the command adb devices from a command prompt.com/documentation/ Installation and Preparation 1. Prepare for development as described in the Oculus Rift Getting Started Guide. Once you have completed building Roll-a-ball. Select Main Camera in the Hierarchy view and set the Position fields of the Main Camera Transform in the Unity Inspector to the following values: X = 0. In your Project tab. To duplicate the Roll-a-ball project. and rename it. Rotate camera forward for a better view. 2. Set the Rotation field of the OVRCameraRig Transform to the following value: X = 35. . simply navigate in your OS to the Unity project folder containing your Roll-a-ball project. we will use the project folder name Roll-a-ball-VR. Launch the new project and prepare the game scene. and select the project folder location for Roll-a-ball-VR in order to launch the project." 4. Y = 10." Modify Roll-a-ball for VR 1. You may skip this lesson if you wish for the purposes of this exercise.42 | Tutorial: Build a Simple VR Unity Game | Unity The final video in the series. Y = 0. you may wish to create a duplicate Roll-a-ball project specifically for VR development. 2. folders. It can be useful to retain a backup of the original unmodified Roll-a-ball project in case you make mistakes or wish to work with it later without the VR assets. 1. Duplicate your Roll-a-ball project (optional). Publishing the game. For this tutorial. 5.. and so forth by the names used in the Unity tutorial." 3. Z = -15. Z = 0. Press F2 and rename the scene "VRMiniGame. open Assets > _Scenes and select "MiniGame. as we will follow a different procedure for building a playable application (PC/Mac) or APK (Android). "107. Launch Unity and select File > Open Project. so it is helpful to follow the names they use in their example.. Note: We refer to the assets. 4." describes building the Roll-a-ball game for play in a web browser. Open the scene "VRMiniGame. copy the folder and all of its contents. Elevate camera above the game board. With its current configuration. To access your Samsung phone's VR capabilities.oculus. the ball will travel slowly when controlled by the Samsung gamepad. More information may be found on application signing in "Creating Your Signature File" in the Mobile App Preparation and Submission Guidelines. you will see the Health and Safety Warning appear over the game. you will need to sign your application with an Oculus Signature File (osig). You may obtain an osig from our self-service portal here: https://developer. copy it to your Unity project folder in /Roll-a-ball-VR/Assets/Plugins/Android/ assets/. Speed up the ball. If you recorded your device ID earlier. check the Virtual Reality Supported checkbox. press any key to continue past it. Save your scene and project before building your application. Select Player in the Hierarchy view and change the Speed value in the Player Controller (Script) tab of the Inspector view from 500 to 800. . Enable Virtual Reality Supported in Player Settings. you may use it now to request your osig file. Once you have received an osig. In the Other Settings pane.com/tools/osig/.Unity | Tutorial: Build a Simple VR Unity Game | 43 Enter Play mode by pressing the play button. Sign your application (Mobile Only). The Unity Game View preview will show the image corresponding to the left eye buffer. Go to Edit > Project Settings > Player and select PC or Android as appropriate. 4. 5. If you are using the PC SDK. 6. Figure 8: Roll-a-ball VR in Unity Scene and Game Views 3. Note that you need only one osig per mobile device. . and then insert the phone into the Gear VR to launch your game. you will not see the score counter or "You win!" message when all the pieces have been collected.44 | Tutorial: Build a Simple VR Unity Game | Unity Build and Play Build and Launch If you are developing for desktop. you will build an executable file that you may launch with your PC or Mac. You may launch the application directly. It will not be visible from Oculus Home. you will build an APK and load it onto your phone. which contains important details for enabling VR for your project. If you are developing for mobile. you will see Roll-a-ball-VR listed with the other apps. Note: Because the GUIText display we built in the Roll-a-ball tutorial will not work with OVRCameraRig without substantial modification. Launching the Game on Gear VR If you select Apps from the Samsung home screen. put the phone in the Gear VR. Play Go ahead and try it out! You may use your keyboard or a paired Samsung gamepad to control your ball and collect the game pickup objects. and when instructed. Follow the build instructions as described by the section Configuring for Build section. 6.1 N/A 4.0 0.0.2 0.0f1 9/08/2015 0.1 0.0 0.1 0.4.0 4.2 4.0 5.4 0.0 1.0.4.0.4.3 4/14/2014 D 0.0.7+ 8/14/2015 0.4.5.6.4.0.1 N/A 4.4.6.0 0.0 0.5.1 0.5.1.5 8/11/2014 D 0.5 1/7/2015 M 0.7.3.7.4.6 3/26/2015 D 0.2.2.2p2 10/1/2015 0.4.4 11/10/2014 D 0.7 6/25/2015 D 0.1 4.2 0.1.0 5.0.0.0 1.4.8.6 3/20/2015 M 0.4 0.3 10/10/2013 D 0.5.0.6.0 Beta 0.3 N/A 4.0.6.3.6.1.5.0.0 4.0 4.0 4. Oculus PC and Mobile SDKs.6.1 0.6.0.0.8.6.2 N/A 4.3.3.0 4.0 4.0.2.5 N/A 4.1 0.8.6.0 5.0 5.7.2.0.0 N/A 4.0.4.4.1 0.5.1 0.3.3 4.2 0.5 9/4/2014 D 0.1 4.3.0 0.1 0.4 5/22/2014 D 0.0.1 0.3.0 0.0.0 Beta 0.5.3.5 1/23/2015 M 0.4 0.5.6 6/12/2015 M 0.4. and Oculus Unity Integration and Utilities packages.6.4.Unity | Unity-SDK Version Compatibility | 45 Unity-SDK Version Compatibility This reference describes the relationship between Unity versions.0.0 0.6.1 4.6.1 4.2 0.0 Beta 0.1 4.1.3.5 0.0 Beta 0.6.1 0.0 4.0.0.3 0.4.2 0.6.5.6.3 .5.2.6.0 0.1 0.5 10/24/2014 D 0.0 0.2.1p2 7/6/2015 0.4 7/24/2014 D 0. Utilities for Unity 5x Versions Release Date Integration PC SDK Mobile SDK Unity 11/16/2015 0.1.2 N/A 4.1 N/A 4.1 0.5.0.4.0.0 4.6 5/15/2015 D 0.4.3.8.4.4.4.2 0.4.0.5 2/27/2015 M 0.4.3.6 3/31/2015 M 0.1 Unity 4x Integration Versions Release Date Integration PC SDK Mobile SDK Unity 10/30/2015 0.0.2.4.2.1p4 10/30/2015 0.4 0.3.2.6.4.3.6 11/12/2014 M 0.0.0 0.4.6.1 0.1 0.1 0.1.4 12/4/2014 D 0.1.3.3 0.2 0.1 0.7+ 8/7/2015 0.4. 1 Beta Utilities for Unity Release Notes This document provides an overview of new features. Utilities for Unity 0.46 | Release Notes | Unity Release Notes This section describes changes for each version release.asset is no longer required to enable gamepad support on mobile. which provides a unified input API for accessing Oculus Touch and Microsoft Xbox controllers.1.x. . • Replacing InputManager. • Deprecated OVRInputControl and OVRGamepadController. • Fixed mobile gamepad bindings for triggers.it is no longer required to replace InputManager. This document provides an overview of new features.0 Beta Overview of Major Changes Note: For detailed information about Unity version compatibility. For information on first-party changes to Unity VR support for Oculus. 0. etc. and fixes included in the latest version of the Oculus Utilities for Unity.1. improvements.asset with Oculus’ version.1.3. D-pad. please see Compatibility and Requirements. and fixes included in the latest version of the Utilities for Unity 5. Utilities for Unity 0. Mobile input bindings are now automatically added to InputManager. API Changes • Added mobile support OVRInput. • Fixed mobile gamepad support when multiple gamepads are paired.2. improvements. Utilities for Unity 0. thumbstick presses. However. Bug Fixes • Fixed mobile gamepad thumbstick deadzone/drift handling and axis scaling.asset if they do not already exist .3 extends OVRInput support to mobile. OVRInputControl and OVRGamepadController are now deprecated and will be removed in a future release. New Features • Default mobile input bindings are now programmatically generated when projects are imported if they do not already exist. see the Unity Release Notes for the appropriate version.0 Beta Overview of Major Changes This version adds an alpha preview release of OVRInput. this asset is still provided for now to maintain legacy support for the deprecated OVRGamepadController and OVRInputControl scripts. Screen dimming on scene transitions. • When switching between a mobile application and System Activities screen. Several minor performance optimizations. Known Issues • Tearing in OS X: Editor preview and standalone players do not vsync properly. Detailed tracking information such as head acceleration. Added “face-locked” layer support to OVROverlay when parented to the camera.1 or higher. Control over the tracking method (positional. please see Troubleshooting and Known Issues. • SDKExamples • Restored MoviePlayerSample API Changes • The Utilities package now requires Unity 5. First-person shooter-style locomotion. HSWDismissed event is now correctly raised when the HSW is dismissed. Refer to documentation for usage. and chromatic aberration. Utilities for Unity 0. and eye height. and latency and the IR sensor pose. Added h264 hardware-decoder plugin for Gear VR.1. the back button becomes stuck in the "down" state. Updated to PC SDK 0. queue-ahead (PC-only). Reduced latency in the pose used by the main thread for raycasting. For more information and workarounds. Bug Fixes • • • • Restored ability to toggle settings such as monoscopic rendering and position tracking. The Utilities extend Unity's built-in virtual reality support with the following features: • • • • • • • • • • Standard camera rig with head-tracked "anchors". velocity. resulting in a vertical tear and/or judder on DK2. for use with Unity versions 5.2 and later.Unity | Release Notes | 47 New Features • • • • • • • Redesigned input API for Oculus Touch controllers and Xbox gamepads.0. Enabled VRSettings.renderScale on Gear VR. eye relief. Control over graphics performance/quality features such as monoscopic rendering.7 and Mobile SDK 0. • Added OVRInput API alpha. .2. head model only. Notification when out of positional tracking range. Information about the current user's IPD.6. Fixed handedness of reported velocity and acceleration values. Experimental overlay support for high-quality text and video on a world-space quad. OVRPlayerController now moves at a consistent speed regardless of scale. rotation-only). • Exposed LeftHand/RightHand anchors for tracked controllers in OVRCameraRig.0 Beta Overview This is the initial release of Oculus Utilities for Unity. Cross-platform gamepad support.1. etc.0. but they offer all the benefits of Unity's built-in VR support: • Improved rendering efficiency with less redundant work performed for each eye.0 Beta The following Unity API changes were made: • • • • • • • • • • • • Unity 5. The experimental overlay quad script OVROverlay also works on the PC. • Oculus SDK 0. roll.VR.1. Use Mobile Movie Texture or similar. • Seamless integration with the Unity Editor. • (Android only) Access to the Oculus platform UI. Removed OvrCapi.6.exe no longer applies. CPU utilization may be slightly higher than in previous versions of Unity.6.2. Added Crescent Bay support. Removed Linux support.7. the low-level C# wrapper for LibOVR. • Mac OS X tearing. 0.1. and fixes included in the Oculus Unity Integration version 0. • Non-distorted monoscopic preview on the main monitor. you must enable PlayerSettings -> Virtual Reality Supported. especially in apps with multiple scenes. but works when you build for Gear VR. API Changes in 0. The Oculus Utilities for Unity expose largely the same API as the Oculus Unity Integration.0 Desktop plugins. improvements. • Performance loss. • (Android only) Performance and power management.6.6. Removed Gear VR MediaSurface functionality. Known Issues • Pitch.x Legacy Integration 0. • OVRPlayerController might end up in an unexpected rotation after OVRDisplay. VSync is currently broken on the Mac. Direct mode now works in the Editor. Unity 4.RecenterPose() is called. and translation are off for the tracking reference frame in Unity 5.1. To fix it. Editor preview is now monoscopic and does not include lens correction. call RecenterPose() again.48 | Release Notes | Unity • Debug overlay with real-time performance and latency graphs.1p3 or higher is now required.0 Overview of Major Changes 0. The integration now uses a single stereo camera instead of two separate cameras for the left and right eyes.0. • Improved stability and tighter integration with features like anti-aliasing and shadows. To use VR. .6 Unity Legacy Integration Release Notes This document provides an overview of new features.0 pulls in the 0.2. DirectToRift.1. for now.1 support (PC and mobile). including in-Editor preview and direct mode support. Some script functionality was replaced by UnityEngine. Before updating your runtime. which provides a unified input API for accessing Oculus Touch and Microsoft Xbox controllers.1. (Mobile) API Changes • Now requires the new Android Plugin Java library OculusUtilities.0 must update to the Oculus Runtime for OS X 0. The source and build files are located at the following SDK path: VrAppSupport/MediaSurfacePlugin.2 below.6. OS X Developers Mac developers using Legacy Integration 0. All Unity projects built with Unity 4 must update to this release.7.1.0 expands upon the changes in Unity 4. Mobile Developers The MediaSurface functionality has been split from the main Unity Integration and provided as a separate plugin. It is fully compatible with both our Mobile and PC SDKs. see the Release Notes for Integration 0.1.2.7. • Fixed thread affinity failing to be set for the TimeWarp and DeviceManager threads.0.jar (found in Assets/Plugins/Android).0 Overview of Major Changes Legacy Integration 0. be sure to run uninstall. Bug Fixes • Fixed Editor error message in Unity Free due to unsigned OVRPlugin.dll.app (found in /Applications/Oculus/) to remove your previous installation. . libOculusMediaSurface. New Features • SDKExamples • MoviePlayer_Sample now looks for media files in the folder Streaming Assets instead of following a hardcoded path on the internal sdcard (default mp4 provided). Note that the SDKExample MediaSurface Plugin is not intended to be production quality.6. For more information on important changes and updates relevant to this version. PC Developers This release of the Unity Legacy Integration is compatible with the Oculus Runtime 0.Unity | Release Notes | 49 The source for the Unity SDKExample MediaSurface Plugin is now provided.6. This version adds an alpha release of OVRInput. and is provided for reference purposes.5.x PC Integration 0. The Media Surface Plugin provides a native library which is used with the Android MediaPlayer for hardware decoding of a single video to a texture. (Mobile) • Fixed device reset when repeatedly plugging and unplugging the Travel Adapter on the Galaxy SAMSUNG S6.so included with the Unity integration package.0.6. (Mobile) • Fixed app crash occurring when using Oculus Runtime for OS X earlier than 0.1. We have made the source available in case you would like to modify it for your use.6 and 0.so.6. or they will not work on PCs using Runtime 0. Unity 4.0.0.5.1. New Features • Added alpha OVRInput script to expose API for Oculus Touch and XInput-based controllers.x Legacy Integration 0. • Now dynamically loads OpenGL ES symbols instead of hard-linking to libGLESv3. cs.2 must update to the Oculus Runtime for OS X 0.app (found in /Applications/Oculus/) to remove your previous installation.2 Overview of Major Changes Note: This release is intended for PC development only.5. which will work in both Extended and Direct Display modes. note that they have been removed and you will need to write your own native plugins or replacement wrappers to access functionality from LibOVRRT.0. • PC builds now produce a single executable file for use in both Extended and Direct Display modes. If you have previously used our C API wrappers in OvrCapi.cs.0. • Removed D3D9.1. This release of the Unity Legacy Integration is compatible with the Oculus Runtime 0.simply open your project in Unity. Bug Fixes • Added back one frame of latency to Unity apps to avoid object motion judder by giving Unity apps one frame of additional GPU time (0. Mobile developers should wait for Legacy Integration version 0.0.5.7. Bug Fixes • Fixed C# script problem that caused D3D11 Exclusive Mode errors.50 | Release Notes | Unity • MoviePlayer_Sample defaults to using Unity MovieTexture functionality on the PC (media file expected as Ogg Theora).1 performance parity). Before updating your runtime.6 and 0. or they will not work on PCs using Runtime 0. be sure to run uninstall.6 and 0.1.x PC Integration 0. • Fixed several Editor Game View issues: . so writing your own plugins or wrappers now will help prepare for your migration to Unity 5. and rebuild.6. All Unity projects built with Unity 4 must update to this release. This change is also required to use CAPI with our Unity 5 Utilities.6. • Oculus runtime log messages now visible in the Unity console. • Unity Editor Game View displays undistorted monoscopic preview. import the custom Integration unityPackage.6. New Features • Compatible with Oculus Runtime versions 0. API Changes • Removed all C API wrappers from OvrCapi. Windows GL.7. Mac developers using Legacy Integration 0. Unity 4. This version removes support for D3D 9 and Windows GL.0. • No longer necessary to rotate Mac monitor for DK2 in System Preferences->Displays.7. API Changes • No longer required to issue ResetVrModeParms to dynamically adjust CPU and GPU clock levels. which will ship very soon. migrating to this version of the legacy integration will be easy . A single executable file is now produced for PC builds. and Linux support. In most cases. New Features • VrAPI: improved frame prediction. Unity Free 4.0. even if built on a Mac.6. • Allows clients to re-map plugin event IDs. • Fixed Game View positioning bug.Unity | Release Notes | 51 • Now works for all aspect ratio settings.0.0 beta.p2. Earlier versions of Unity 5 should not be used with the Mobile SDK.p2.6.0 – please check back for updates. Apps now render in mono without tracking when VR isn't present.2.6. • No VR support for in-editor preview on Windows until Unity 4.1 New Features • Allow Unity MediaSurface dimensions to be modified via plugin interface. For both the PC and Mobile SDKs we recommend the following Unity versions or higher: Unity Pro 4.3. • Slight increase in latency for trivial scenes (i. Known Issues • Mac tearing: Editor Game View and standalone players do not vsync properly.e. Bug Fixes • Fixed not being able to enable chromatic aberration correction in the Unity plugin.6.7p4. Android players are unaffected. resulting in a vertical tear and/or judder on DK2. compatibility issues are known to exist with Unity 5 and OpenGL ES 3. For mobile development.0.exe in Unity 4. Bug Fixes • Fixed prediction glitch every 64 frames. • Use correct prediction for OVR_GetCameraPositionOrientation.3p2 and later.. • Removed the hard dependency from the Oculus runtime. Mobile Unity Integration 0. Mobile Unity Integration 0. in particular for Unity.6.6. Unity Professional 5. or Unity Personal 5. . • Fixed location of the PlatformMenu Gaze Cursor Timer PC Unity Integration 0. • Eliminated the need for the DirectToRift.0. • Fixed adjusting clock levels from Unity during load. This fixes the black screen issue.0.6. scenes that take < 3 ms to render).2. • Synced with the Oculus PC SDK 0.6.0 New Features • Disabled eye texture anti-aliasing when using deferred rendering. • Fixed bug that blacked out Game Views when more than one were created.0 Overview of Major Changes • Oculus Runtime is no longer required for mobile development. • Eliminated the need for the DirectToRift. PC Unity Integration 0.5.0. Though this was not a leak.0. The 0.1p2.0.1 is to System Activities event handling in Unity.5. The Mobile SDK is compatible with Unity 5. • Removed the hard dependency from the Oculus runtime.0.com/downloads/ . garbage collection routinely takes 1 to 2 milliseconds.6. This requirement will be addressed in a future release of the SDK. improvements. Please check back for updates. As with Mobile SDK v 0.52 | Release Notes | Unity 0.5 of the Oculus Mobile SDK. and fixes included in the Oculus Unity Integration that shipped with version 0.1 Oculus runtime. Mobile Unity Integration 0.6.1 Beta.0.0.0 New Features • Disabled eye texture anti-aliasing when using deferred rendering. which addresses a problem with OpenGL ES 3.3.5 Mobile Unity Integration Release Notes This document provides an overview of new features.5. Please ensure you have installed the corresponding 0. Even in simple applications.6.oculus.0 Overview of Major Changes The Mobile Unity Integration is now synced with the Oculus PC SDK 0. improvements. In applications that were already close to dropping below 60 Hz.5. but there is still a known Android ION memory leak. it can be found at the following location: https:// developer. This fixes the blackscreen issue.1 Overview of Major Changes The most significant change in 0. we recommend Unity versions 4. it would cause garbage collection to trigger much more frequently.5.exe in Unity 4. Mobile Unity Integration 0.5. The event handling now uses a single buffer allocated at start up.6 of the Oculus PC SDK.6 PC Unity Integration Release Notes This document provides an overview of new features. the increased garbage collection frequency could cause notable performance drops.5. Unity developers using this SDK version must install the Oculus Runtime for Windows or OS X. Known Issues • For use with the Mobile SDK. 0. Apps now render in mono without tracking when VR isn't present.0 code for handling System Activities events in Unity was doing heap allocations each frame. and fixes included in the Oculus Unity Integration that shipped with 0.3p2 and later. Bug Fixes • Rework System Activities Event handling to prevent any per-frame allocations that could trigger Garbage Collector. 0. including an Android ION memory leak and compatibility issues with OpenGL ES 3. Bug Fixes • Health and Safety Warning no longer displays in editor Play Mode if a DK2 is not attached.0p2 and higher.0. several issues are still known to exist. handling for native development is unchanged.0 .5.4 Mobile Unity Integration Release Notes This document provides an overview of new features. If your application requires this feature.oculus. Known Issues • For use with the Mobile SDK. • VrPlatform entitlement checking is now disabled by default.0.5. it can be found at the following location: https:// developer. and fixes included in the Oculus Unity Integration that shipped with version 0. New Features • Synced with the Oculus PC SDK 0.0p2 and higher. several issues are still known to exist. . please refer to the Mobile SDK Documentation for information on how to enable entitlement checking.0 .3. Please check back for updates. • VrPlatform entitlement checking is now disabled by default. handling for native development is unchanged. If your application requires this feature.5.6. While the Mobile SDK is compatible with Unity 5. Please check back for updates. Known Issues • For use with the Mobile SDK.1 Oculus runtime. improvements.3.com/downloads/ VrPlatform entitlement checking is now disabled by default in Unity. New Features • Synced with the Oculus PC SDK 0.5.Lollipop support as well as important Android bug fixes. which includes Android 5. which includes Android 5. Bug Fixes • Health and Safety Warning no longer displays in editor Play Mode if a DK2 is not attached.1 Beta. including an Android ION memory leak and compatibility issues with OpenGL ES 3. we recommend Unity versions 4.4 of the Oculus Mobile SDK. Mobile Unity Integration 0.6. While the Mobile SDK is compatible with Unity 5.0. Please ensure you have installed the corresponding 0.0.0.Lollipop support as well as important Android bug fixes.0.Unity | Release Notes | 53 VrPlatform entitlement checking is now disabled by default in Unity.0. please refer to the Mobile SDK Documentation for information on how to enable entitlement checking.0 Overview of Major Changes The Mobile Unity Integration is now synced with the Oculus PC SDK 0. 0.1 Beta.5.1 Beta. we recommend Unity versions 4. please refer to the Unity Development Guide: Migrating From Earlier Versions section for information on how to upgrade projects built with previous versions of the Mobile Unity Integration. see OVRModeParms.4. we recommend updating to Unity 4. Mobile Unity Integration 0. We would like to highlight the inclusion of the new Mobile Unity Integration with full DK2 support based on the Oculus PC SDK 0.4.1.4.4 Mobile Unity Integration 0.54 | Release Notes | Unity Mobile Unity Integration 0.3 New Features • New Mobile Unity Integration Based on Oculus PC SDK 0.4.1 Overview of Major Changes Added support for Android 5.0 Overview of Major Changes First public release of the Oculus Mobile SDK. • Moonlight Debug Util class names now prefixed with OVR to prevent namespace pollution.4. API Changes The following are changes to Unity components: . As this is a significant API refactor.2 Overview of Major Changes If you are developing with Unity.6. Mobile Unity Integration 0. This section will help you upgrade.4.cs for an example.3+ Unity Integration’s API is significantly different from prior versions.0 – Lollipop support. New Features • Added Unity Free support for Gear VR developers.0 (Lollipop) and Unity Free.4. which contains Android 5. API Changes • Fix for camera height discrepancies between the Editor and Gear VR device. Bug Fixes • Unity vignette rendering updated to match native (slightly increases effective FOV). • Unity volume pop-up distance to match native. • Provide callback for configuring VR Mode Parms on OVRCameraController. Migrating From Earlier Versions The 0.4. Update() when entering and exiting camera view. OVRCamera Removed. Get/Set*(ref *) methods Replaced by properties. Eye anchor Transforms are tracked in OVRCameraRig’s local space. 3. OVRCameraRig. If your eye cameras are on GameObjects named “CameraLeft” and “CameraRight” which are children of the OVRCameraController GameObject (the default). then the prefab should cleanly upgrade to OVRCameraRig and continue to work properly with the new integration.Update() on HMD connect and disconnect. OVRPlayerController. The following are changes to helper classes: Table 4: Helper Classes OVRDisplay HMD pose and rendering status.Update() when the Health and Safety Warning is no longer visible. and OVRDevice.Hmd → Ovr. follow these steps: 1. OVRCameraController → OVRCameraRig Performs tracking and stereo rendering. Ensure you didn’t modify the structure of the OVRCameraController prefab. OVR. Tracking acquired/lost Fired from OVRCameraRig.*EyeAnchor Transforms give the relevant poses. OVRTracker Infrared tracking pose and status. Remove the old integration by deleting the following from your project: • • • • OVR folder OVR Internal folder (if applicable) Moonlight folder (if applicable) Any file in the Plugins folder with “Oculus” or “OVR” in the name . Use eye anchor Transforms instead. 2. The following are changes to events: Table 5: Events HMD added/removed Fired from OVRCameraRig.Hmd Pure C# wrapper for LibOVR. Write down or take a screenshot of your settings from the inspectors for OVRCameraController. Behavior Changes • • • • • • OVRCameraRig’s position is always the initial center eye position. Layered rendering: multiple OVRCameraRigs are fully supported (not advised for mobile). IPD and FOV are fully determined by profile (PC only). You will have to re-apply them later. OVRPlayerController’s position is always at the user’s feet.Unity | Release Notes | 55 Table 3: Unity Components OVRDevice → OVRManager Unity foundation singleton. Upgrade Procedure To upgrade. HSWDismissed Fired from OVRCameraRig. libOculusPlugin. 5.. Then. Refer to the API changes described above.rightEyeCamera ---------------------------------------------------------------------if ( cameraController. to if (OVRManager.85 by setting its yposition. Re-apply your previous settings to OVRCameraRig. ---------------------------------------------------------------------- .15 to the y-position of the converted OVRCameraController. then you have two options. including: vrlib. add 0. You may either (1) rely on the new default player eye-height (which has changed from 1.. Note that the substitution of prefabs does not take place until after all script compile errors have been fixed.forward. If you previously used an OVRPlayerController with Use Player Eye Height unchecked on its OVRCameraContoller.. Adjust the camera's y-position. then this height should be expected to change when profile customization is added with a later release. add 0. Note that if you decide to go with (1). If you previously used an OVRPlayerController.09 to the camera z-position relative to its y rotation (i. res/raw and res/values folders Import the new integration. If this is undesired.85 to 1.GetCameraOrientation() -> cameraRig. 10. no action is needed. a. • Android-specific assets in the Plugins/Android folder.15 to the camera y-position.e.GetCameraPosition( ref cameraPosition ) ) { .rotation cameraController.NearClipPlane -> cameraRig. Fix any compiler errors in your scripts. Adjust the camera's x/z-position. +0.rightEyeAnchor. and OVRManager.position cameraController.farClipPlane cameraController.isPresent) { // get the camera forward vector and position Vector3 cameraPosition = cameraController.GetCameraPosition() -> cameraRig. . If you previously used an OVRPlayerController with Use Player Eye Height checked on its OVRCameraContoller.unitypackage Click Import All. -0.display. or (2) uncheck Use Profile Data on the converted OVRPlayerController and then manually set the height of the OVRCameraRig to 1. -0.09 to x if it has 90 y-rotation.jar. +0.. 8.Re-start Unity Common Script Conversions OVRCameraController -> OVRCameraRig cameraController. add 0. 9.rightEyeCamera.09 to z if it has 0 y-rotation.centerEyeAnchor. If you previously used an OVRCameraController without an OVRPlayerController.09 to z if it has 180 y-rotation. 6.GetCameraForward( ref cameraForward ) && cameraController. b.so.FarClipPlane -> cameraRig.position.rightEyeCamera. Note that the runtime camera positions have been adjusted to better match the camera positions set in the Unity editor. 7. Click Assets -> Import Package -> Custom Package… Open OculusUnityIntegration. b. Vector3 cameraForward = cameraController.56 | Release Notes | Unity 4.675).nearClipPlane cameraController. If you previously used an OVRCameraController without an OVRPlayerController. OVRPlayerController.rightEyeAnchor.09 to x if it has 270 yrotation).GetCamera() -> cameraRig. then be sure uncheck Use Profile Data on your converted OVRPlayerController. c.centerEyeAnchor. you can get back to the previous positions by adding a small offset to your camera: a. batteryTemperature OVRManager. ---------------------------------------------------------------------FollowOrientation ---------------------------------------------------------------------FollowOrientation is no longer necessary since OVRCameraRig applies tracking in local space. to OVRManager.GetBatteryLevel().RecenterPose(). ---------------------------------------------------------------------cameraController.batteryLevel ---------------------------------------------------------------------OrientationOffset Set rotation on the TrackingSpace game object instead. ---------------------------------------------------------------------OVRDevice.Unity | Release Notes | 57 OVRDevice. OVRDevice.instance.GetBatteryTemperature(). to OVRManager. You are free to script the rig’s pose or make it a child of another GameObject.ReturnToLauncher().ReturnToLauncher(). to OVRManager.display. .ResetOrientation().
Report "Unityt"
×
Please fill this form, we will try to respond as soon as possible.
Your name
Email
Reason
-Select Reason-
Pornographic
Defamatory
Illegal/Unlawful
Spam
Other Terms Of Service Violation
File a copyright complaint
Description
Copyright © 2024 DOKUMEN.SITE Inc.