Skip to content
This repository has been archived by the owner on Nov 8, 2019. It is now read-only.

GVR SDK for Unity v0.5.2

Compare
Choose a tag to compare
@rusmaxham rusmaxham released this 26 Apr 19:55
· 51 commits to master since this release

Upgrade Instructions

  • Due to changes in the plugin contents, we recommend you delete the Cardboard directory and (if you have no other iOS plugins) the Plugins/iOS directory before importing the v0.5.2 SDK.

Fixes

  • General performance improvements and CPU load reduction to reduce thermal throttling.
  • New gyro drift correction method for better stability across more phones.
  • Recent versions of Unity (5.1.x and 5.2.x) have changed the way they report DPI, which is affecting the SDK's calculation of screen size. This has been worked around.
  • A bug in the StereoController.AddStereoRig() function caused it to cache the StereoController.Eyes array before the eye cameras were created. Fixed.
  • The offscreen RenderTexture used for distortion correction takes properties from project settings (e.g. antialiasing, pixel format). Depth now defaults to 24 bits.
  • The GL.IssuePluginEvent() Unity call is now passed a unique ID in order to be compatible with other native plugins. (This only matters if you use the old Native distortion method.)

Additions

  • Onboarding and Setup dialogs now support localized language strings. For Android this is automatic. For iOS, enable Localizations in the Xcode project.
  • Default distortion correction method is now done entirely in Unity to avoid the overhead of using GL.IssuePluginEvent() with our native code (due to the native code needing to carefully manage GL state internally). The old native C++ version is still available if issues arise.
  • A new CardboardCamera prefab manages both full screen clear and distortion correction. It is included in CardboardMain, or created automatically if needed.
  • The Cardboard object has a simple slider to adjust the scale of the RenderTexture resolution. Dial it down to increase performance.
  • There is now an onscreen Back Button that functions like the normal Android back button (which is hidden in immersive mode). You can turn it on or off, and choose how to respond.
  • Distortion correction is now done during the Camera rendering phase, which means that uGUI Canvases in Screen Space Overlay mode (and OnGUI calls) will now appear onscreen.
  • The new distortion correction method is compatible with Metal (iOS) and multi-threaded rendering (Android).

Changes

  • The offscreen RenderTexture resolution is padded to account for the barrel distortion, in order to reduce relative fuzziness in pixels near the center.
  • Stereo cameras are no longer fully mirrored from the parent Camera object on ever frame, only when either the device profile changes (after a QR code scan) or you call StereoController.UpdateStereoCameras. If you enable the StereoController.keepStereoUpdated checkbox, then the mirroring will occur every frame. This option is useful if you are animating parameters on the Camera and want to keep the stereo cameras up to date. Otherwise, leave this option off, as it has a performance cost.

Known Issues

  • On Android, do not build with the targetSDKVersion set to 23 (Android 6.0). The new runtime permission model in Android 6.0 will prevent your app from reading the QR code settings unless the user manually adds Storage permission in the App Info screen for your app, which is very non-obvious. The bug is that Cardboard should prompt the user for Storage permission after install and first launch, but it does not. As a result, it silently falls back to the default Cardboard QR code settings (which is a V1 Cardboard). Clarification: Only affects your users that have Android 6.0 phones.

  • On iOS, if you are building with Xcode 7 and the iOS 9 SDK, you must enable http: connections in order for QR code scanning to succeed. The details of this issue are explained on the App Transport Security Technote page in Apple's developer site.

    The quick fix:

    • Open your Info.plist.
    • Add a dictionary key named NSAppTransportSecurity.
    • Inside that dictionary add a boolean key named NSAllowsArbitraryLoads and give it the value YES.
  • In Unity 5 on iOS, it is recommended to set the Orientation to Auto, and then in the Allowed Orientations, remove all but Landscape Left.

  • For gyro drift correction, note that if you are experiencing a steady drift, it helps to place the phone on a solid surface for a few seconds (or until drift subsides).

  • If the phone's gyro is too noisy, the drift correction will never consider the phone as being in a "stable" pose in order to estimate the drift.

  • Gyro readings are a bit jittery in multi-threaded rendering, possibly due to CPU scheduling or frame buffering. The cause is under investigation.

  • The Update Stereo Cameras button does not copy the values of any Image Effects attached to both mono and stereo cameras, only the values of the Camera component itself.

  • Make sure GazeInputModule is placed above other input modules like TouchInputModule in the EventSystem's component list, or it will not be able to activate.

  • (Fixed in v0.7) Switching between Native and Unity distortion modes at runtime is not fully supported. The screen may stop updating until the app is paused and resumed. Set the desired distortion method in the Cardboard component's Inspector panel in the editor.

  • The UI layer elements (settings gear icon, alignment marker) may remain active when switching from a Cardboard scene to a non-Cardboard scene. Workarounds are to add a Cardboard component to the target scene, setting its VRModeEnabled = false, or to disable the UI components by code (_Cardboard.SDK.EnableSettingsButton = false, etc) before loading the non-VR scene.

  • See also the v0.5.1 Known Issues.

Changelog

  • General performance improvements and CPU load reduction to reduce thermal throttling.
  • New gyro drift correction method for better stability across more phones.
  • Onboarding and Setup dialogs now support localized language strings. For Android this
    is automatic. For iOS, enable Localizations in the Xcode project.
  • Default distortion correction method is now done entirely in Unity to avoid
    GL.IssuePluginEvent() overhead. The old native C++ version still available if issues arise.
  • The GL.IssuePluginEvent() call uses a unique ID in order to be compatible with other native
    plugins. (This only matters if you use the old Native distortion method.)
  • A new CardboardCamera prefab manages both full screen clear and distortion
    correction. It is included in CardboardMain, or created automatically if needed.
  • Distortion correction is now done during the Camera rendering phase, which means
    that uGUI Screen Space Overlays (and OnGUI) will appear onscreen now.
  • The new distortion correction method is compatible with Metal (iOS) and multi-
    threaded rendering (Android).
  • The offscreen rendertexture used for distortion correction takes properties from
    project settings (e.g. antialiasing, pixel format). Depth now defaults to 24 bits.
  • The offscreen rendertexture resolution is padded to account for the barrel distortion,
    in order to reduce relative fuzziness in pixels near the center.
  • The Cardboard object has a simple slider to adjust the scale of the rendertexture
    resolution globally. Dial down to increase performance.
  • There is now an onscreen Back Button that functions like the normal Android back
    button (which is hidden in immersive mode). You can turn it on or off, and choose
    how to respond.
  • Recent versions of Unity (5.1.x and 5.2.x) have changed the way they report DPI, which
    is affecting the SDKs calculation of screen size. This has been worked around.
  • A bug in the StereoController.AddStereoRig() function which cached the eyes array before
    filling it in has been fixed.