Unity 4 Legacy Integration

| Published 2016-03-28
I have read and agree to the terms of the License
I understand this download is no longer supported by Oculus.

Unity 4.x Legacy Integration 1.3.0

This document provides an overview of new features, improvements, and fixes included in the latest version of the Unity 4.x Legacy Integration. For information on first-party changes to Unity VR support for Oculus, see the Unity Release Notes for the appropriate version. You will find an updated scripting reference for the included C# scripts in our Unity Developer Reference.

Note : For detailed information about Unity version compatibility, please see Compatibility and Requirements.

This public release incorporates all changes from private releases 0.9.0 through 1.3.0. It adds support for PC SDK 1.3, including support for Rift consumer version hardware.

Users may now close applications when switching to Home. When they do this, Unity receives a call from the runtime to close the application. OnApplicationQuit() callback behaviors still work as before. Keep this in mind if you have previously written a custom shutdown procedure.

VR Focus

When VR Focus is lost in Unity 4 applications, all cameras are disabled and Time.timeScale is set to 0. Applications should check Time.timeScale and pause gameplay and audio if it is 0.

Note that Rift and Samsung Gear VR applications will pause rendering when not in focus in VR. Recentering requests initiated from the Universal Menu are now implemented and will be handled automatically by the Unity Integration.

New Features

  • Added support for PC SDK 1.3, including support for Rift consumer version hardware.
  • Added support for Asynchronous TimeWarp and Phase Sync.
  • Added Rift Remote controller support.
  • Added application lifecycle management, including VR-initiated backgrounding and exit.
  • Exposed proximity sensor.
  • Added support for multiple trackers.
  • Exposed velocity and acceleration for all tracked nodes.
  • Added VR Focus support. When VR Focus is lost, Time.timeScale is set to 0.
  • Added support for recentering from within the Home Universal Menu.
  • Audio output now automatically uses the Rift headphones, if enabled in the Oculus app.
  • Rift’s inter-axial distance slider now affects the distance between Unity’s eye poses.
  • Exposed controller visibility so apps can respond to occlusion, et cetera.

API Changes

  • OVRManager.isUserPresent is true when the proximity sensor detects the user.
  • OVRInput.GetControllerLocal[Angular]Velocity/Accelerations exposes the linear and angular velocity and rotation of each Touch controller.
  • Added OVRInput.GetControllerPosition|OrientationTracked(..) for controller visibility.

Bug Fixes

  • Removed redundant axial deadzone handling from Xbox gamepad input.
  • Increased deadzone on OVRInput stick input to prevent drift.
  • Fixed issue where frustrum/occlusino culling was less effective on Gear VR.
  • Fixed several errors and race conditions due to hazards in start-up ordering.

Known Issues

  • The Rift’s microphone is not the default when calling Microphone.Start(null,..). Please find the entry in Microphone.devices that contains the word Rift and use it.
  • When you stop playing in the Unity editor, the last frame from the previous play remains frozen on the Rift.
  • If an application's simulation time is paused, OVRInput will not update.
  • Volume control will be missing on mobile applications until the release of Mobile SDK 1.0.2. OVRVolumeControl has been removed, but it may still be accessed by using previous versions of the Oculus Unity 4 Integration.
  • If a VR app is running while a Rift is unplugged from a PC and plugged back in without restarting the application, then the Rift display will appear black. To fix this, add the following lines to OVRPlugin.cs and disable your OVRCameraRig and OVRManager if OVRPlugin.shouldRecreateDistortionWindow is true. You will have to quit and re-start the app before it can use VR again.
private enum Status
Debug = 0,

+ ShouldRecreateDistortionWindow,

public static bool shouldRecenter { get { return GetStatus(Status.ShouldRecenter); } }

+ public static bool shouldRecreateDistortionWindow { get { return GetStatus(Status.ShouldRecreateDistortionWindow); }