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

Releases: googlevr/gvr-unity-sdk

GVR SDK for Unity v1.0.1

26 Apr 19:23
Compare
Choose a tag to compare

Fixes

  • Fixed issue with eye flashing artifacts.
  • Prevent GvrFPS divide-by-zero error.
  • Changed VRModeEnabled in GvrViewer to be a no-op for the native integration.

GVR SDK for Unity v1.0.0

26 Apr 19:30
Compare
Choose a tag to compare

Google VR is now natively supported in the Unity Daydream technical preview{: .external}! This release marks the debut of native Daydream integration in Unity, which enables Daydream developers to take full advantage of all of Unity and
Daydream's optimizations in VR rendering. Get the Daydream technical preview{: .external} now!

The v1.0 release of the Google VR SDK for Unity is compatible with Unity 5.2.1 or newer, but future releases will require a version of Unity with native Google VR support. To use the Google Daydream platform, you must be using a version of Unity with native support.

Upgrade Instructions

Warning: Back up your project before attempting to upgrade.

The first time you open/create a project using the v1.0 Google VR SDK, you may see some dialog boxes guiding you through the upgrade. If your project has modified the AndroidManifest.xml file pay close attention, as you will need to manually merge the new Android Manifest template with your existing file.

Upgrading from Google VR SDK for Unity v0.8.5 and above:

  • Open a scene that does not use any Google VR functionality. One way to do this is to save your work and create a new, temporary scene.
  • In the Projects panel, delete the GoogleVR and Plugins directories in the Assets folder.
  • Import the Google VR SDK for Unity unitypackage.

Upgrading from Google VR SDK for Unity v0.8.1 and below:

  • Follow the upgrade instructions from v0.8.5.
  • Enable Daydream and/or Cardboard in Player Settings > Other Settings > Virtual Reality SDKs.

Fixes

  • Fixed spatial audio bug when setting the max distance parameter via scripting.
  • Fixed spatial audio reverb gain parameter adjustments to ensure smoother transitions.

Additions

  • Added the GvrIntent class to expose information about the current Android Intent/Activity. This can be used to implement deep linking in your application.
  • Added the GvrSettings class to work with Daydream-specific settings. These include the viewer type, sustained performance mode and controller handedness. Requires native Google VR support in Unity.
  • Added the GvrFPSCanvas prefab in Assets/GoogleVR/Prefabs/Utilites. This displays the rendering speed in milliseconds per frame.
  • Added higher order ambisonic playback support in the Google VR audio engine.
  • Added the Metal material type to surface materials of Google VR audio rooms.
  • Added a no distance attenuation option to distance rolloff methods for Google VR spatial audio sound object sources.
  • Major performance improvements in binaural rendering of audio sources.

Changes

  • The Daydream controller requires native Google VR support in Unity. This impacts the GvrController script and Controller Demo scene.
  • The GvrViewer script is no longer required with native Google VR support in Unity. It is still used to provide VR emulation in the editor, or for magic window mode in your application. If your application is using a version of Unity without native support, you will still need to include the GvrViewer script.

Deletions

  • Removed the "Unity" distortion correction mode from the GvrViewerMain prefab.
  • Magic window mode is no longer supported with native Google VR support.

Known Issues

  • In the Unity technical preview, using 8x MSAA will result in a black screen.
  • On versions of Unity without native Daydream integration, one eye may flash/freeze when transitioning between magic window mode.
  • Metal is not fully supported on iOS.
  • iOS Cardboard applications may crash under iOS 10 because the generated Xcode project does not request camera permissions in its Info.plist file. Add the permission to fix the crash.
  • See also the v0.9 "Known Issues"

GVR SDK for Unity v0.9.1

26 Apr 19:37
Compare
Choose a tag to compare

Fixes

  • The GVR_SDK_VERSION string has been corrected.
  • Project export to Android Studio should no longer ask for the READ_PHONE_STATE permission.

GVR SDK for Unity v0.9.0

26 Apr 19:37
Compare
Choose a tag to compare

Additions

  • Added PlayScheduled() to GvrAudioSource in order to set a sound to play at a specific time.
  • In-editor spatial audio playback works on Linux installations.

Fixes

  • GvrAudioSource is no longer duplicated after a delete followed by undo.
  • Stereo separation is correctly applied to the GvrEye component in Start(), rather than only after a Resume(). This bug was not visible (or a problem) when using the now-deprecated prefabs.
  • Fixed matrix math in GvrDistortion.cginc for surface shaders only, using vertex-displacement distortion correction. (Most applications do not use this technique.)

Changes

  • The Windows audio library is now statically linked, making the MSVC redistributable no longer required.
  • See also the v0.8.5 Changes below for information on how to prepare for the upcoming native integration of GoogleVR in Unity.

Deletions

  • The C# events in GvrViewer were vulnerable to order-of-execution bugs that can cause the app to crash, so they have been removed. Check the state variables in Update() and related functions per usual Unity practice.
  • The old Electronic Display Stabilization (synchronous reprojection) setting has been removed in favor of Daydream’s upcoming asynchronous reprojection.
  • Magnetic trigger detection has been removed from the SDK, so 2014 Google Cardboard viewers and related models are no longer supported. Please use an older SDK if these viewers are still important to your product.

Known Issues

  • (Fixed in v0.9.1) When a project is exported to Android Studio, the resulting app may ask the user for the READ_PHONE_STATE permission. This is due to an empty manifest in the unitygvractivity.aar file, which causes Android Studio to assume the target Android SDK is 1, in terms of permissions that the user must grant.
  • The neck model is currently inoperative, due to the recent architectural changes for Unity VR integration.
  • (Fixed in v0.9.1) The GVR_SDK_VERSION string in GvrViewer.cs is slightly out of date.
  • See also the v0.8 Known Issues.

GVR SDK for Unity v0.8.5

26 Apr 19:41
Compare
Choose a tag to compare

Changes

The following instructions may be followed with "v0.9" in place of "v0.8.5".

The v0.8.5 release of the Google VR SDK for Unity includes a preview of the new workflow for using the SDK after Google VR is a native part of the Unity. Instead of using prefabs, the Unity camera will render as mono or stereo depending on the target platform and Google VR settings will be built into the editor.

We have made a number of changes to support this workflow:

  • Most of the prefabs are deprecated in the v0.8.5 release. They will be removed entirely in a future release.
  • The remaining scripts and prefabs have been modified to work similar to how the native integration will function.

We recommend that new projects using Google VR use the preview workflow to reduce the number of changes necessary in the future. Documentation has been updated to reflect the preview workflow.

For existing projects using Google VR, you have three options.

Option 1: Continue using prefabs
Remain on the v0.8.5 release of the Google VR SDK for Unity indefinitely, which will be the final release that supports prefabs. Cardboard applications should continue to work.

Option 2: Upgrade with each Google VR release
Follow the steps to use the preview workflow in v0.8.5. Later releases may have additional small changes, but you will always be on the latest and greatest.

Option 3: Upgrade after native integration
Remain on the v0.8.5 release of the Google VR SDK for Unity using prefabs until the native integration is available, then upgrade your workflow all at once.

Upgrade Instructions

  • Open a scene that does not use any Google VR functionality. One way to do this is to save your work and create a new, temporary scene.
  • In the Projects panel, delete the GoogleVR and Plugins directories in the Assets folder.
  • Import the Google VR SDK for Unity unitypackage.

If migrating an existing Google VR project:

  • Delete the GvrMain prefab.
  • Add a Camera to the scene, e.g. under GameObject > Camera.
  • Select the new Camera. In the Inspector panel, find the Tag drop-down selection at the top and set it to MainCamera.
  • Confirm that the camera has the following default components:
    • Flare Layer
    • GUI Layer
    • Audio Listener
  • Add the GvrViewerMain prefab to the scene, found in Assets/GoogleVR/Prefabs.

If using the default gaze-based reticle:

  • Add the GvrReticle prefab as a child object to the Camera, found under Assets/GoogleVR/Prefabs/UI.
  • If using the GazeInputModule system:
    • Add a Physics Raycaster component to the Camera.
    • Adjust the Event Mask as needed for your scene. The sample scenes use the following settings: Default, TransparentFX, Water
  • If using the GvrGaze script, attach it to the Camera.

GVR SDK for Unity v0.8.1

26 Apr 19:42
Compare
Choose a tag to compare

Deletions

  • The Auto Drift Correction option on the GvrViewer script has been removed since gyro drift correction is now an intrinsic feature of the GoogleVR NDK.

GVR SDK for Unity v0.8.0

26 Apr 19:44
Compare
Choose a tag to compare

Upgrade Instructions

  • Delete the old Cardboard and Plugin directories before upgrading to the new version of the SDK. Do not have a Cardboard scene open in the editor when doing this.
  • Update your code that refers to renamed entities (see Changes below).

Fixes

  • The motion-based idle detector was too eager to detect idleness, resulting in occasional screen dimming.
  • On iOS, the screen brightness no longers goes to 100% in VR Mode. Instead it stays fixed at what it was before VR Mode was enabled.

Additions

  • Added support for the Daydream Controller. Use the GvrControllerMain prefab to enable, and communicate with it in code via GvrController.Instance.
  • Added a new demo scene to test controller connectivity.
  • Added a GetOutputData() method to GvrAudioSource, which passes through to AudioSource.GetOutputData(). Note that the data returned is the raw audio data, which is not spatialized.

Changes

  • Cardboard has been rebranded GoogleVR. The name prefix on all scripts and prefabs is now Gvr.
  • The Cardboard class in particular is now called GvrViewer.
  • The singleton instance of it, Cardboard.SDK, is now GvrViewer.Instance.
  • The formerly split SDK and Demo unitypackages have been combined into GoogleVRForUnity.unitypackage.

Known Issues

  • Ensure that there is exactly one instance of GvrViewer in any VR scene. In particular, if you call DontDestroyOnLoad on one so that it carries over into the next scene, make sure the new scene does not already contain one.
  • Starting with 5.3.4p2, a bug in Unity prevents rendering World Space uGUI Canvases into a RenderTexture. Since RenderTextures are used for distortion correction, this effects all such canvases in VR.
  • See also the v0.7 Known Issues.

GVR SDK for Unity v0.7.0

26 Apr 19:47
Compare
Choose a tag to compare

Upgrade Instructions

  • Delete the old Cardboard and Plugin directories before upgrading to the new version of the SDK. Some newer versions of Unity (5.3+) do this for you automatically, but not all.

Fixes

  • Fixed a crash bug from using the magnetic trigger or tilt event before loading a level.
  • Fixed a bug caused by calling RenderTexture.Create() on some phones too early.
  • Allow the CardboardReticle to change distance with non-interactive objects too.
  • Worked around a crashing bug in Unity when using a native audio plugin.

Additions

  • For iOS, bitcode is supplied in the native libraries.
  • Added spread and bypass room effect parameters to CardboardAudioSource.

Changes

  • Minimum supported Android SDK is now KitKat (19).
  • For Android, package the Java support code and resources in a .aar file.
  • For iOS, the -ObjC Xcode flag is now required by native Cardboard code, and will be added at project build time.
  • For iOS, manual Xcode project changes to support Cardboard are no longer required.

Deletions

  • Removed legacy support for Unity 4.x
  • Removed the TapIsTrigger setting. A screen tap is always treated as a trigger now.
  • Removed obsolete Cardboard.cs properties from pre-v0.5
  • Removed the onboarding dialog and "sync with Cardboard" option.

Known Issues

  • Unity’s Daytime Water (Pro) does not appear to reflect the sky properly in VR.
  • iOS Simulator is not supported.
  • Can't reliably start a CardboardAudioSource from Awake(). Use Start() instead.
  • Only one CardboardAudioListener can exist in the scene. Workaround is to put it on a "Microphone" game object, and reparent it to the current camera.
  • See also the v0.6 Known Issues.

Changelog

  • Removed legacy support for Unity 4.x
  • Minimum supported Android SDK is now KitKat (19)
  • Removed the TapIsTrigger setting. A screen tap is always treated as a trigger now.
  • Removed obsolete Cardboard.cs properties from pre-v0.5
  • Removed the onboarding dialog and "sync with Cardboard" option.
  • Fixed a crash bug from using the magnetic trigger or tilt event before loading a level.
  • Fixed a bug caused by calling RenderTexture.Create() on some phones too early.
  • Fixed screen rotation on landscape-default devices.
  • Allow the CardboardReticle to change distance with non-interactive objects too.
  • Worked around a crashing bug in Unity when using a native audio plugin.
  • For Android, package the Java support code and resources in a .aar file.
  • For iOS, the -ObjC Xcode flag is now required by native Cardboard code, and will be added at project build time.
  • For iOS, bitcode is supplied in the native libraries.
  • For iOS, manual Xcode project changes to support Cardboard are no longer required.
  • Known issue: iOS Simulator is not supported.
  • Known issue: Can't reliably start a CardboardAudioSource from Awake(). Use Start() instead.
  • Known issue: Only one CardboardAudioListener can exist in the scene. Workaround is to put it on a "Microphone" game object, and reparent it to the current camera.

GVR SDK for Unity v0.6.0

26 Apr 19:50
Compare
Choose a tag to compare

Upgrade Instructions

  • Delete the old Cardboard and Plugin directories before upgrading to the new version of the SDK. Some newer versions of Unity (5.3+) do this for you automatically, but not all.

Deprecation Notice

  • In the next release of the SDK, the Legacy folder will be retired, along with all C# functions marked "Obsolete".
  • In the next release, the minimum officially supported version of Unity will be 5.2.

Fixes

  • The UI layer no longer flashes at app startup.
  • Ensure that a custom Skybox component on the parent camera is reflected on the stereo child cameras.
  • The -ObjC flag on iOS no longer causes a link-time error in Cardboard apps.
  • Fixed a null-pointer exception that caused scenes to render one or both eyes black if the scene started out with VR mode turned off, and turned it on in code later.
  • Apps no longer crash on Quit or LoadLevel calls if the phone has been tilted on its side by the user.

Additions

  • Support for Spatial Audio.
  • Main Menu entry Cardboard which makes it easy to reach documentation and file bugs.
  • Support for gaze-based interaction, either with uGUI EventSystem or independently of it. Implement C# interfaces ICardboardGazePointer and/or ICardboardGazeResponder to interact with the gaze system.
  • A C# event on CardboardHead for callbacks after the head tracking has been updated.

Changes

  • The Cardboard.SDK property no longer auto-instantiates a Cardboard object. Instead it logs an error message if the property is null. Ensure that a Cardboard object exists in the scene before accessing the property. The CardboardManager prefab can be used if the Cardboard instance should be independent of any scene camera, or you can call the Cardboard.Create() static function to ensure that the SDK property is initialized.
  • Reverted a change in v0.5.2 that allocated a padded RenderTexture (intended to account for barrel distortion). The extra size of the texture caused an unreasonable performance hit, especially on 2K phones. Now the texture size matches the screen resolution, as in older releases.
  • Reverted a change in gyro-drift correction on iOS that actually made drift worse on iPhones.
  • CardboardCamera prefab is now CardboardManager, a standalone instance of the Cardboard script.
  • The "gaze pointer" object in GazeInputModule is now a reticle, with customizable behavior and appearance.
  • (iOS only) The automatically launching onboarding dialog has been removed.

Deletions

  • Removed obsolete RadialUndistortionEffect shader and script.
  • On iOS, the Sync with Cardboard option has been removed.
  • The Tilt sensor has been disabled to prevent the tilt-based app crash noted above. The Tilt and OnTilt members of Cardboard may be removed in a future SDK release.

Known Issues

  • Be sure the screen orientation is locked to Landscape Left when the Cardboard SDK is initialized and active. On iOS, do this by leaving the Orientation set to Automatic in Player Settings, with the only allowed orientation being Landscape Left.
  • (Fixed in v0.7) A bug in Unity 5.2 and 5.3's Spatial Audio support causes mobile apps to crash at unexpected times. On Android, this occurs when the app is resumed. On iOS, it may happen at startup.
  • See also the v0.5.2 Known Issues.

Changelog

  • Added support for spatialized audio playback, including scripts, prefabs, and editors.
  • Added a Cardboard entry to the editor's main menu, making it easier to reach documentation.
  • Added new CardoardManager prefab which packages everything except a Main Camera. Useful when adapting your own cameras for stereo.
  • Added a simple reticle interface for gaze-based UI interaction.
  • Updated GazeInputModule to use the reticle interface.
  • Removed the "auto-instantiation" behavior of Cardboard.SDK, which sometimes created an extra Cardboard.
    You must ensure that a Cardboard object exists in the scene before Cardboard.SDK is used.
    The various prefabs like CardboardMain and CardboardManager are intended to help with this.
    Or call Cardboard.Create() from code.
  • Fixed the "UI layer flash" that happens on startup when the UI layer should not appear.
  • Removed the obsolete RadialUndistortionEffect shader and script.
  • Ensure that if the Main Camera uses a Skybox component, then the stereo cameras do too.
  • Added an event to CardboardHead for scripts that want to act after the head tracking is updated.
  • Revert a change from last release that padded the offscreen rendertexture to account for barrel distortion. On higher resolution phones, the performance hit was too great.
  • Revert a change from last release that used the raw gyro on iOS together with the Cardboard gyro filtering. The result was noticeably worse than just using the clean iOS gyro.
  • Removed the automatically triggered onboarding dialog. It can still be triggered from code.
  • Fixed a bug causing apps that start with VR mode turned off to not render correctly when VR mode is later turned on.
  • Disabled the Tilt event callback, which due to threading-related issues was causing apps to crash if the phone had been tilted 90 degrees to the right before exiting or loading a new scene. Apps needing tilt detection should use Input.accel rather than Cardboard.Tilted.
  • Fixed a link-time issue on iOS caused when using the -ObjC linker flag.
  • Set the target SDK to 22 in AndroidManifest.xml to get around permission issues on Marshmallow.
  • DEPRECATION NOTICE: The next SDK release will drop Unity 4 compatibility and remove the Legacy folder.

GVR SDK for Unity v0.5.2

26 Apr 19:55
Compare
Choose a tag to compare

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.