Releases: googlevr/gvr-unity-sdk
GVR SDK for Unity v0.5.1
Upgrade Instructions
- Due to extensive changes in the plugin contents, it is recommended to delete the
Cardboard
directory and (if you have no other Android plugins) thePlugins/Android
directory before importing the v0.5.1 SDK.
Fixes
- Fixed a deprecated code warning in Unity 5.1.1 projects, relating to Graphics APIs.
- Fixed a null reference error when changing the simulated viewer or phone in the Cardboard inspector panel.
- For iOS apps, the screen idle timer was not disabled, so the screen could turn off while the phone is in a Cardboard viewer. Fixed.
- VR Mode was being left enabled when loading a scene that had no Cardboard script, which affected rendering and input handling in the new scene. All VR Mode state is reset on scene load now.
- An incorrect
Input.touchCount
was returned due to Cardboard hiding the first screen tap (turning it into a trigger event). Fixed. - A crash on certain phone models, in a native constructor called PlatformInfo has been fixed.
Additions
- GazeInputModule can be used with a mouse, screen tap, or other inputs as well as with the Cardboard trigger.
Deletions
- Removed
Simulate Distortion Correction
flag in the Editor. - The SDK no longer forces Android screen brightness to maximum, which was introduced in v0.5.
- The
android.permission.INTERNET
tag has been removed from AndroidManifest.xml.
Changes
- The Demo scenes have been split off into a separate unitypackage.
- The gyro drift correction setting is not used on iOS, as it appears not to be needed.
Known Issues
- (Fixed in v0.5.2) The settings gear button icon lives in two places: Cardboard/Resources/CardboardSettingsButton.png.bytes for Android, and Plugins/iOS/resources.bundle/gearButton.png for iOS.
- The screen timeout is disabled when the
Cardboard
script initializes, regardless of whether the app is in VR Mode or not. UseScreen.screenTimeout
to control this. - (Fixed in v0.5.2) A minor bug in CardboardProfile.cs uses
halfWidth
instead ofhalfHeight
on a line computing a vertical offset. This has no effect on the phone but may be slightly visible in the editor. - (Removed in v0.6) The new-user onboarding wizard launches not at app startup, but in the first loaded scene that has a Cardboard component in it. To ensure it happens at startup if the first scene is not VR, add a Cardboard component to the scene and set its
VRModeEnabled
property to false. - If a
Cardboard
component is carried over into a new scene (via DontDestroyOnLoad), but the new scene already has a Cardboard component, then the Cardboard SDK stops working: no triggers, no settings button, and other effects. This occurrence is logged. To avoid this problem, ensure that no scene ever has more than oneCardboard
component. - (Fixed in v0.5.2) Distortion correction on iOS when using native distortion (which requires OpenGL) looks erroneous. It is advised to use Metal, or if OpenGL is required, to force the use of the Unity distortion correction by setting
CardboardAndroidDevice.debugDisableNativeDistortion
to true. - (Removed in v0.6) In versions of Unity prior to 5.1.1, disallow portrait mode or else the onboarding dialog can result in a flickering screen if the user changes orientation. (This appears to have been a bug in Unity.)
- See also the v0.5.0 Known Issues.
Changelog
- Screen timeout disabled in iOS apps.
- Reset VR Mode state on level load in case new scene does not have Cardboard.
- Return correct Input.touchCount.
- Crashing bug on certain models due to native code called PlatformInfo fixed.
- GazeInputModule can be used with the mouse as well as with the Cardboard trigger.
- Removed Simulate Distortion Correction flag in the Editor.
- No longer force screen brightness to max on Android.
- Removed the INTERNET permission from AndroidManifest.xml.
- Split the demos into a separate unitypackage.
- Ignore gyro drift setting on iOS (it doesn't need it).
GVR SDK for Unity v0.5.0
Upgrade Instructions
- Due to extensive changes in the plugin contents, it is recommended to delete the
Cardboard
directory and (if you have no other Android plugins) thePlugins/Android
directory before importing the v0.5 SDK.
Fixes
- If native code distortion correction is not supported, fall back to using an Image Effect.
- If native code UI layer is not supported, fall back to rendering it in Unity.
Additions
- The iOS build platform is now supported.
- Added a new C++ native code implementation for head tracking and distortion correction.
- The Java-based native code implementation has been moved to the Legacy folder.
- Refactored Cardboard.cs into a front-end Unity API and a back-end VRDevice class.
- VRDevice implementations provided for Android, iOS, and Unity editor.
- Some Cardboard properties have been renamed (but the old names still work).
- Added a Tilt event for when the viewer is turned on its side.
- Added C# events to Cardboard for responding to Trigger and Tilt events.
- Added more phone and viewer profiles to the in-editor simulation menus.
Deletions
- The
Cardboard.SDK.BackButtonExitsApp
property. - The
Cardboard.SDK.IsInCardboard
property.
Known Issues
- (Fixed in v0.5.2) Multi-threaded rendering: Currently not supported.
- Incorrect screen rectangle on some phones: There are several functions in Android to query the phone's dpi, from which the size of the screen is derived. For every such function, there are some phone models that return an incorrect dpi value, which leads to an incorrect screen size estimate.
- (Fixed in Unity 5.1) Unity 5 rendering issues: As of Unity build 5.0.0f4, the following steps should be taken to fix or ameliorate any rendering issues, such as an all-black screen, flashing textures, or non-stereo views:
- Enable the Development Build option in the Build dialog. This seems to fix various rendering glitches, like flashing textures.
The root cause of the rendering glitches is under analysis, with
assistance from Unity. Note: If you are using any Image Effects, make sure thatStereoController
's Direct Render property is set to false. Check if that fixes the issue first.
- Enable the Development Build option in the Build dialog. This seems to fix various rendering glitches, like flashing textures.
Changelog
- The iOS build platform is now supported.
- Added a new C++ native code implementation for head tracking and distortion correction.
- The Java-based native code implementation has been moved to the Legacy folder.
- Refactored Cardboard.cs into a front-end Unity API and a back-end VRDevice class.
- VRDevice implementations provided for Android, iOS, and Unity editor.
- Some Cardboard properties have been renamed (but the old names still work).
- Added a Tilt event for when the viewer is turned on its side.
- Added C# events to Cardboard for responding to Trigger and Tilt events.
- Added more phone and viewer profiles to the in-editor simulation menus.
- If native code distortion correction is not supported, fall back to using an Image Effect.
- If native code UI layer is not supported, fall back to rendering it in Unity.
GVR SDK for Unity v0.4.10
Upgrade Instructions
- See the v0.4.9 Upgrade Intructions if upgrading from v0.4.5 or earlier.
Fixes
- The neck model used in the Editor had the wrong sign in the Z coordinate.
- Coroutine management is moved to
OnEnable
andOnDisable
so that deactivating the game object works properly. - In the Legacy demo scene, the CardboardGUI object's Head property was set to (None), so that the pointer did not appear.
- For performance, the StereoController.Eyes array is cached rather than recomputed each time it is accessed. The method
InvalidateEyes()
may be called to reset the cache if necessary. - Fixed a bug in
CardboardEditor.cs
which did not save the Editor-only settings.
Known Issues
- See the v0.4.9 Known Issues, which are unchanged in this release.
Changelog
- StereoController now caches the Eyes array. Call InvalidateEyes() to reset the cache.
- Moved coroutine management in Cardboard and StereoController to OnEnable()/OnDisable().
- Fixed CardboardGUI's Head property in the Legacy demo scene.
- Fixed the neck model Z offset in the Editor.
- Fixed a bug in CardboardEditor which failed to save the Editor-only settings.
GVR SDK for Unity v0.4.9
Upgrade Instructions
- Plugin layout: This release rearranges the layout of the package. In a Cardboard project which is being upgraded from v0.4.5 or earlier, it is recommended to delete the
Cardboard
subdirectory before importing the new package. - New native libraries: In a Cardboard project which is being upgraded from v0.4.1 or earlier, it is recommended to delete the following files:
- Plugins/Android/guava-jdk5-14.0.1.jar
- Plugins/Android/libRenderingPlugin.so
- Plugins/Android/libprotobuf-java-2.3-nano.jar
Fixes
- Sensor Drift: Added
Cardboard.SDK.AutoDriftCorrection
to control gyro drift. - Clearing the whole screen: The entire screen is correctly cleared in VR mode.
- Unity 5 Import Issues: The scripts have been fixed to eliminate compiler messages when importing the SDK into a Unity 5 project.
Additions
- Canvas UI (uGUI) Support: The SDK provides a script to add gaze-based interaction to the Unity Event System. The main demo scene has been changed to illustrate this feature.
- Alignment Marker in Editor: A simulated alignment marker is drawn in the Editor if the feature is enabled for the phone.
- Distortion Correction in Editor: The editor simulates the same distortion correction during Play mode as occurs on the phone. This can be disabled in the SDK object's Inspector.
- Neck model: A neck model is applied to the head tracking. The scale can be controlled by setting
Cardboard.SDK.neckModelScale
[0..1].
Deprecations
- CardboardGUI: The
CardboardGUI
scripts and related assets have been moved to theLegacy
folder. On Unity 4.6+, the new Canvas UI is the preferred UI system. The original demo scene, which uses this feature, has been moved toLegacy
as well. - SkyboxMesh and StereoLensFlare: These scripts are not required in Unity 5.
Known Issues
- (Fixed in Unity 5.1) Unity 5 rendering issues: As of Unity build 5.0.0f4, the following steps should be taken to fix or ameliorate any rendering issues, such as an all-black screen, flashing textures, or non-stereo views:
- Enable the Development Build option in the Build dialog. This seems to fix various rendering glitches, like flashing textures.
The root cause of the rendering glitches is under analysis, with assistance from Unity. Note: If you are using any Image Effects, make sure thatStereoController
's Direct Render property is set to false. Check if that fixes the issue first.
- Enable the Development Build option in the Build dialog. This seems to fix various rendering glitches, like flashing textures.
- Build error "Unable to convert classes into dex format": See the Upgrade Instructions above.
Changelog
- Added Cardboard.SDK.AutoDriftCorrection to turn gyro drift correction on/off (default on).
- Added GazeInputModule for using gaze and magnet to interact with uGUI elements.
- Added Cardboard.SDK.NeckModelScale to control the scale of the built-in neck model.
- Added CardboardHead.trackRotation/trackPosition to control specific types of head tracking.
- The entire screen is correctly cleared in VR mode.
- Unity 5 import errors and warnings have been fixed; it will still ask to upgrade (say Yes).
- The alignment marker is also drawn in the editor.
- Distortion correction is applied in the editor.
- Deprecated CardboardGUI scripts: not needed in Unity 5, moved to Legacy folder.
- Deprecated SkyboxMesh and StereoLensFlare scripts: ditto.
- Demo scene now uses uGUI instead of OnGUI.
- Original demo scene using CardboardGUI moved to Legacy folder.
GVR SDK for Unity v0.4.5
Upgrade Instructions
-
New native libraries:
In a Cardboard project which is being upgraded, it is recommended to delete
the following files:- Plugins/Android/guava-jdk5-14.0.1.jar
- Plugins/Android/libRenderingPlugin.so
- Plugins/Android/libprotobuf-java-2.3-nano.jar
Fixes
-
CPU Support:
The x86 architecture is now supported. -
"Unable to find unity activity in manifest" message during build:
The Android manifest has been fixed. -
Aspect ratio wrong on tablets in Unity Free:
The rendered screen area is determined by the device profile. Note that
this may result in only using a portion of a tablet's screen -- the size
is determined by the Cardboard device's dimensions. -
VR Toolkit's UI Layer in Unity Free:
Now works in Unity Free. Note this only refers to the alignment marker
and the settings button, not to distortion correction.
Additions
-
Distortion correction toggle Added
nativeDistortionCorrection
option to
Cardboard.SDK
, which turn on or off the built-in distortion correction. -
Recenter orientation Added
Recenter()
function toCardboard.SDK
, which
resets the head tracker so the phone's current heading becomes the forward
direction (+Z axis). -
Stereo screen resolution control Added
CreateScreen(xres, yres)
function
toCardboard.SDK
, which creates texture used for rendering stereo, with
the specified resolution. It it not necessary to call this function
directly, unless you specifically want a resolution different from the
phone's screen. -
Back button handling option: Added
BackButtonExitsApp
option to
Cardboard.SDK
, which controls whether the Android back button exits the
app or appears in Unity as an Escape keypress. -
Control culling mask of left and right eyes:
AddedtoggleCullingMask
toCardboardEye
, allowing some render layers
to be enabled or disabled independently in each eye. -
Match by zoom: Added
matchByZoom
slider toStereoController
, which
makes the stereo cameras do a zoom when adjusting their FOV to match the
parent mono camera. Intended for use in effects such as when the player is
looking through binoculars / scope. -
SkyboxMesh layer:
Addedlayer
option to set the layer of theSkyboxMesh
.
Known Issues
-
(Fixed in Unity 5.1) Unity 5 import and rendering issues: As of Unity
build 5.0.0f4, the following steps should be taken to fix or ameliorate
various import and rendering issues, such as an all-black screen, flashing
textures, or non-stereo views:- Remove
CardboardGUI
, and avoid usingGUI
class methods
(e.g.GUI.Button
). - Edit the
Teleport
script in the demo scene to remove all references to
CardboardGUI
andGUI
. - Remove
SkyboxMesh
. Unity's skybox shaders handle parallax correctly, so
it is not needed. - Remove
StereoLensFlare
. Ditto. These two scripts also cause the import
errors. - Enable the Development Build option in the Build dialog. This seems
to fix various rendering glitches, like flashing textures.
The root cause of the rendering glitches is under analysis, with
assistance from Unity. - Remove
-
Incorrect screen rectangle on some phones:
There are several functions in Android to query the phone's dpi,
from which the size of the screen is derived. For every such function,
there are some phone models that return an incorrect dpi value, which
leads to an incorrect screen size estimate. -
Build error "Unable to convert classes into dex format":
See the Upgrade Instructions above.
Changelog
- Added Cardboard.SDK.nativeDistortionCorrection to toggle built-in distortion correction on/off.
- Added Cardboard.SDK.Recenter() to reset the head tracker to the current direction.
- Added Cardboard.SDK.CreateScreen(x,y) to init the stereo rendertexture at given resolution.
- Added Cardboard.SDK.BackButtonExitsApp to control how the back button is handled.
- Added CardboardEye.toggleCullingMask to turn on or off specific layers in each eye.
- Added StereoController.matchByZoom to match the mono FOV by zooming rather than translating.
- Added SkyboxMesh.layer to set the layer of the generated skybox mesh.
- The x86 architecture is now supported.
- The message ‘Unable to find Unity Activity’ has been fixed.
- The aspect ratio is determined by the device configuration, regardless of screen size.
- The UI layer (alignment marker and settings button) work in Unity Free.
GVR SDK for Unity v0.4.1
Changes
- (Deprecated for Unity 5) CardboardGUI in Unity Free:
The CardboardGUI script automatically disables itself in Unity Free.
Changelog
- The CardboardGUI script automatically disables itself in Unity Free.
GVR SDK for Unity v0.4.0
Known Issues
-
(Fixed in v0.5.2) Multi-threaded rendering:
Currently not supported. -
(Deprecated for Unity 5) CardboardGUI in Editor:
Does not react to resizing the play window properly. -
(Deprecated for Unity 5) Single SkyboxMesh:
Make sure only one SkyboxMesh script exists or is
enabled at one time. Otherwise the user will see multiple overlapping
skyboxes because each one is visible to all cameras. -
(See v0.4.5 Known Issues) Unity 5:
Plugin not yet extensively tested with the Unity 5 beta release.
We plan to provide Unity 5 support in the near future. -
(Fixed in Unity 4.5+) Compile errors from [Tooltip] attribute:
The Tooltip attribute is supported in Unity 4.5+. If this is causing
compile issues then, if possible, upgrade. Otherwise, commenting out these
lines in the scripts will work. -
(Fixed in v0.4.5) CPU Support:
Shipped plugin targets ARMv7. We have built versions of
libRenderingPlugin.so for other CPU architectures. -
(Fixed in v0.4.9) Sensor Drift:
Some phone models and individual units are susceptible to
drift in the orientation. VR Toolkit does not at present provide any
correction for drift. However, some phones have been observed to drift less
after being used regularly for a period of time. -
(Fixed in Unity 5) Gyro and Accelerometer:
A bug in the current implementation of the Unity
plugin prevents Unity from reading these sensors through the InputManager. -
(Fixed in v0.4.5) "Unable to find unity activity in manifest":
The message
Unable to find unity activity in manifest. You need to make sure
orientation attribute is set to landscape manually.
appears in the console during builds. It appears to be harmless - no other
side effect have been observed. -
(Fixed in v0.4.5) Aspect ratio wrong on tablets in Unity Free:
On larger screens the scene may appear squished. This is due to a
combination of several factors: Lacking information on the specifics of
the device (from NFC tag or QR code), rendering the scene to be viewed
through lenses, and lack of RenderTexture support in Unity Free. -
(Fixed in v0.4.5) VR Toolkit's UI Layer in Unity Free:
The UI layer of VR toolkit, consisting of the alignment marker and the
settings button icon, do not appear for Unity Free builds, also because
of RenderTexture not being supported. -
(Fixed in v0.4.1) CardboardGUI in Unity Free:
The demo scene has the CardboardGUI script activated, which causes a
black screen in Unity Free (since it uses RenderTextures). Disable or
remove the CardboardGUI object from the scene.
Changelog
- Fixed bug in the alignment marker rendering.
- Fixed bug converting mouse click to magnet trigger when playing in the editor.