Releases: googlevr/gvr-unity-sdk
GVR SDK for Unity v1.200.1
GVR SDK for Unity v1.200.1 (2019-07-17)
Breaking changes
- Removed all instances of deprecated
GUILayer
component from the Main Camera in all sample scenes, for compatibility with Unity 2019.3.
Deprecations
- Dropped support for Unity 2018.1 due to lack of Java8 support and the Google VR SDK for Android now requiring it. 2017.4 LTS is still supported.
Bug fixes
- Fixed Unity 2019.3 build error "More than one file was found with OS independent path 'lib/armeabi-v7a/libgvr_audio.so'.".
GVR SDK for Unity v1.200.0
Support for Unity 5.6 has ended
Unity has discontinued support for 5.6. As a result, we have discontinued support of Unity 5.6 and have raised the minimum supported version of Unity to 2017.4.
Breaking changes
GvrXREventsSubscriber.loadedDeviceName
's setter is now private.- The deprecated
GvrAudio*
components have been removed. If your project uses GvrAudio, please upgrade to Resonance Audio (developers.google.com/resonance-audio/migrate). Resonance Audio supports Unity 2017.1 and newer and is natively integrated in Unity 2018.1 and newer.
Behavioral changes
- Decreased render priority of GvrController.shader from
Overlay+100
toTransparent
to address controller render order issues.
Other changes
- Added documentation to all public methods, classes and properties.
- Added Beta features to Instant Preview, enabling the following:
- Controller Configuration
- Controller Tracking Status
- Added Instant Preview support for handedness preferences.
- The
InstantPreview.cs
script now always launches Instant Preview's VR-mode intent (it previously occasionally launched the 2D-mode intent). - New DemoInfoPanel component and prefab to log and show developer information, including app and SDK versions.
- GoogleVR/Beta/Demos rearranged to use same structure as GoogleVR/Demos.
- Renamed some fields across demos and internal code.
- Reordered tokens in all classes to conform to standard C# style.
- All C# files now adhere to 100-character line limit.
- Updated bundled lib GVR for Android to v1.200.0.
- Added Android 64 bit build support.
- Fixed a NullReferenceException in the VideoDemo scene when clicking the Daydream controller App button.
- Removed unused components from the VideoDemo scene.
Experimental see-through mode
To learn more about see-through mode, read our announcement and developer documentation for the Android NDK and Unity.
Experimental features and GoogleVR.Beta
APIs
NOTE: Beta APIs in the GoogleVR.Beta
namespace are not subject to the usual deprecation process. Beta APIs are expected to change and may be removed entirely in a future version without warning.
- New GvrBetaHeadset prefab provides UI properties to configure see-through mode on scene start. Use this in place of GvrHeadset prefab.
- New
GvrBetaHeadset
class that provides an API to change see-through mode at runtime. - New GvrSeeThroughUI shader and material to do proper alpha blending with see-through mode.
- Updated all GoogleVR shaders to do proper alpha blending with see-through mode. The alpha channel blend operation
OneMinusDstAlpha One
has been appended to the existing color channels blend operation ofSrcAlpha OneMinusSrcAlpha
. - New
GvrBetaSettings
class that provides an API to query status and request use of experimental system features like see-through mode.
New beta demo scene HelloMR demonstrates new experimental see-through mode features:
- Allows the user to cycle through different see-through modes.
- Component
DemoSeeThroughController
cycles through different see-through modes whenever any controller'sApp
button is clicked. - Asks the user to enable see-through mode if the system supports it and it is not enabled.
Bug fixes
- Fixed issue 941 where Instant Preview was being installed on devices that aren't Daydream-ready.
- Fixed issue 944 where manually setting
GvrPointerInputModule.Pointer
doesn't cause theGvrPointerGraphicRaycaster
to clear thecachedPointerEventCamera
field, leadingGvrPointerGraphicRaycaster.eventCamera
to return an incorrect camera when usingRaycastMode.Direct
. - Fixed issue 985 where mouse left click no longer triggered pointer click events for the Cardboard VR SDK emulation in Editor.
- Fixed Issue #1009. Upgrade
native_libs
gradle build to 3.3.1. - Fixed an issue in Instant Preview where
GvrPointer
raycasts would be projected from the wrong origin.
GVR SDK for Unity v1.190.1
GVR SDK for Unity v1.190.1 (2019-01-16)
Support for Unity 5.6 ending soon
Unity has discontinued support for 5.6. As a result, starting with Google VR SDK v1.200.0 we will discontinue support of Unity 5.6 and raise the minimum supported version of Unity to 2017.4.
Bug fixes
- Issue #998 where
InstantPreview.UpdateEvents()
would raise anEntryPointNotFoundException
on Windows.
GVR SDK for Unity v1.190.0
GVR SDK for Unity v1.190.0 (2019-01-11)
Support for Unity 5.6 ending soon
Unity has discontinued support for 5.6. As a result, starting with Google VR SDK v1.200.0 we will discontinue support of Unity 5.6 and raise the minimum supported version of Unity to 2017.4.
Deprecations
- The Controller Emulator has been deprecated. Please use Instant Preview instead.
Other changes
- Added support for the following methods for 6DoF headsets when using Instant Preview:
TryGetFloorHeight()
TryGetRecenterTransform()
TryGetSafetyRegionType()
TryGetSafetyCylinderInnerRadius()
TryGetSafetyCylinderOuterRadius()
- Added support for the following events for 6DoF headsets when using Instant Preview:
GvrEventType.Recenter
GvrRecenterEventType.RecenterEventRestart
GvrRecenterEventType.RecenterEventAligned
GvrEventType.SafetyRegionExit
GvrEventType.SafetyRegionEnter
- Updated HelloVR controller connection status messages for clarity.
- Updated Instant Preview error messages when
adb
is not found. - DemoSceneManager's
HeadsetDemoManager
component now only logs debug console messages when its Enable Debug Log checkbox is checked. - Added console warning in editor if a VR enabled camera's near clipping plane might cause Daydream controller clipping.
- Added Controller Emulator deprecation warning message to Gvr Controller Input component UI.
- Updated copyright headers in all
*.cs
files. - Updated bundled lib GVR for Android to v1.190.0.
Experimental features and GoogleVR.Beta
APIs
- Added limited support for Daydream experimental 6DoF controllers developer kit when using Instant Preview.
- Note, while the experimental 6DoF controllers will be 6DoF tracked, Instant Preview currently renders the 6DoF controllers using the Daydream (3DoF) controller mesh and skins. The correct 6DoF controller mesh and skins will be used when the app is built and run on device.
GoogleVR.Beta
APIsGvrControllerInputDevice.GetConfigurationType()
andGvrControllerInputDevice.GetTrackingStatusFlags()
are not yet supported by Instant Preview.
Bug fixes
- Fixed
NullReferenceException
s fromDemoInputManager.SetControllerInputActive()
in KeyboardDemo and VideoDemo scenes. - Fixed issue 972 where the Controller Emulator created singleton game objects when set to
OFF
.
GVR SDK for Unity v1.180.0
Support for Unity 5.6 ending soon
Unity has discontinued support for 5.6. As a result, starting with Google VR SDK v1.200.0 we will discontinue support of Unity 5.6 and raise the minimum supported version of Unity to 2017.4.
Breaking changes
- Removed components deprecated in v1.70.0:
GvrController
. UseGvrControllerInput
instead.GvrControllerVisualManager
. UseGvrTrackedController
instead.GvrPointerManager
. UseGvrPointerInputModule
instead.
Deprecations
- Using the Controller Emulator app to emulate a Daydream controller is deprecated. To test your app in the editor, use Instant Preview instead. The GvrControllerMain prefab now defaults the Emulator Connection to
OFF
.
New APIs & functionality
- Added
GoogleVR.Beta
namespace containing new beta APIs to support experimental 6DoF controllers. See below for additional details. - Added properties to
GvrControllerInputDevice
:Buttons
,ButtonsDown
, andButtonsUp
which return the bitmask of all buttons that are currently down, just went down, and just went up. GvrControllerVisual
changes:- Added protected virtual method
GetVisualAssets()
. Subclasses can override this method to change the mesh and material of the visual rendering. This method is called every frame during the visual update process. - Changed
PreferredAlpha
to virtual.
- Added protected virtual method
GvrControllerInputDevice
changes:- Added full buttons state getters
Buttons
,ButtonsDown
, andButtonsUp
, which return the various states for all buttons in one call.
- Added full buttons state getters
- Added properties to GoogleVR/Unlit/Controller shader for setting the UV position and radius of the touchpad.
Other changes
- Controller implementation now interfaces with a new shim library that is shared with Unity 2018.3 and later. These changes should be invisible to app developers, and are mentioned here for completeness only.
- Updated bundled lib GVR for Android to v1.180.0.
- Binaries in the SDK are now covered by the Google API TOS.
Bug fixes
- Fixed issue 863 where video autoplay fails if the delay is shorter than the first frame.
- Fixed issue 870 where switching scenes would cause Instant Preview to attempt to destroy previously destroyed cameras, resulting in error messages.
- Fixed issue 947 where setting
Time.timeScale
to0
would cause undefined behavior forMouseControllerProvider
gyro values, resulting in error messages. - Fixed issue 954: changed
GvrBuildPreprocessor
's error messages to warning messages, to support developers build both Google VR and non-Google VR mobile apps. - Fixed
GvrPointerInputModuleImpl.IsPointerOverGameObject
to check thepointerId
of theCurrentEventData
.
Experimental 6DoF controllers
To learn more about the experimental 6DoF controllers, read our announcement and developer documentation.
New APIs and functionality
GvrControllerButton
: AddedTrigger
andGrip
buttons.
New GvrEventSystem behavior
- Experimental 6DoF controllers emit
PointerDown
,PointerUp
, andPointerClick
pointer events, triggered byGvrControllerButton
sTouchPadButton
,Trigger
,Grip
, andApp
.- Daydream (3DoF) controllers will continue to emit pointer events for only
TouchPadButton
, but not theApp
button.
- Daydream (3DoF) controllers will continue to emit pointer events for only
PointerEventData
is generated such thatTouchPadButton
andTrigger
buttons trigger UI components' click behaviors, whileApp
andGrip
will not.PointerEventData
generated by controllers now contains extended event information exposed through the newPointerEventData
methods:- The actual type of the
PointerEventData
is now of typeGvrPointerEventData
. This is an internal detail, and only mentioned for completeness. GvrGetButtonsDown()
returns theGvrControllerButton
that went down to trigger the event.GvrGetControllerInputDevice()
returns theGvrControllerInputDevice
from which the pointer event originated.
- The actual type of the
New Beta APIs & functionality
NOTE: Beta APIs in the GoogleVR.Beta
namespace are not subject to the usual deprecation process. Beta APIs are expected to change and may be removed entirely in a future version without warning.
- New assets and material for the experimental 6DoF controllers.
- New GvrBetaControllerPointer prefab that uses new
GvrBetaControllerVisualMulti
component to switch controller meshes at runtime and change controller transparency based on positional tracking status. GvrControllerInputDevice.GetConfigurationType()
returns whether a controller is 3DoF or 6DoF.GvrControllerInputDevice.GetTrackingStatus()
returns a controller's positional tracking status.
New beta demo scene Hello6DoFControllers demonstrates new experimental 6DoF controller features:
- Demonstrates use of two controllers.
- Component
DemoObjectController6DoF
demonstrates usage of the experimental 6DoF controller's grip button to "grab" the floating object.
GVR SDK for Unity v1.170.0
Other changes
- Instant Preview now properly applies the neck model to 3DoF headsets.
- Updated bundled lib GVR for Android to v1.170.0.
Bug fixes
- Fixed issue 690 where setting
Time.timeScale = 0
caused the the Cardboard reticle pointer to disappear. - Fixed issue 835 where accessing
XRSettings.loadedDeviceName
was unnecessarily allocating memory every frame, resulting in excessive garbage collection. The newGvrXREventsSubscriber
class now avoids per-frame allocations in Unity 2018.3 and later. - Reduced garbage collection by moving an allocation in
AndroidNativeControllerProvider
from every frame to once at class instantiation. - Fixed issue where incorrect "No GvrEditorEmulator instance was found in your scene. Please ensure that GvrEditorEmulator exists in your scene." messages would appear when only one was present.
- Fixed Unity case 537052 where
GvrReticlePointer
didn't trigger buttons properly when tilted more than 45˚ from vertical. - Specified doc URLs for Google VR script components. Clicking the components' doc icon in the inspector view will now open the corresponding API reference docs.
GVR SDK for Unity v1.150.0
Multiple controller support
- New
GvrControllerInputDevice
class for accessing controllers, accessible viaGvrControllerInput.GetDevice(GvrControllerHand hand)
. - New
GvrControllerInput.OnDevicesChanged
event to handle changes inGvrControllerInputDevice
instances. Old instances will be marked invalid and error when used. When this event fires, re-fetch the desiredGvrControllerInputDevice
fromGvrControllerInput.GetDevice()
. New handlers added to this event will be called immediately upon adding. - New
GvrControllerHand
enum for specifying handedness.- Values:
Right
,Left
,Dominant
,NonDominant
. Dominant
controller will always be present on single and multiple controller systems and will map to theRight
orLeft
controller depending on the handedness system prefrerence setting (GvrSettings.Handedness
).
- Values:
- New
GvrControllerButton
enum for specifying controller buttons. Values can be OR'ed together to create a multi-button mask. - New
GvrTrackedController.ControllerHand
property to specify which handGvrTrackedController
tracks. - New
IGvrControllerInputDeviceReceiver
interface. Script components that that implement this receiver interface and are children ofGvrTrackedController
or children of the object set inGvrTrackedController.ArmModel
will receive callbacks when the tracked controller initializes or changes its device instance. - GvrControllerPointer prefab defaults to
Dominant
controller.- The prefab will automatically track the Daydream controller on devices that only support one controller.
- To develop for devices that support two controllers, add a second prefab instance to your scene and change the hand property to
NonDominant
.
- HelloVR scene now has two
GvrControllerPointer
game objects forDominant
andNonDominant
hands.- On devices that only support a single controller, only the
Dominant
controller will be activated at runtime.
- On devices that only support a single controller, only the
- DemoSceneManager prefab updated for 2 controllers.
DemoInputManager
'sControllerPointers
property is now an array to handle multiple controllers. Since there can only be one pointer at a time,DemoInputManager
activates the single pointer on the last controller the user clicked theApp
orTouchPadButton
button.- Generally, when upgrading from obsolete
GvrControllerInput
methods toGvrControllerInputDevice
methods, you will need to consider how best to getGvrControllerInputDevice
instance updates. If your component will be a child ofGvrTrackedController
, then your component should implement theIGvrControllerInputDeviceReceiver
interface to receive device instance updates fromGvrTrackedController
. This has the advantage that your component will automatically get theGvrControllerInputDevice
of the hand for which the parentGvrTrackedController
is configured. If your component lives outside ofGvrTrackedController
you can either fetch a device instance every time you need one fromGvrControllerInput.GetDevice()
, or register an event hander forGvrControllerInput.OnDevicesChanged
to receive callbacks when device instances change and cache the result of a call toGvrControllerInput.GetDevice()
.
Breaking changes
None.
Deprecations
- Most of the static
GvrControllerInput
methods and properties have been deprecated. Replacement methods and properties can be accessed on the newGvrControllerInputDevice
instances:- The following static properties are available, with the same name, as
GvrControllerInputDevice
instance properties:OnStateChanged
State
Orientation
Gyro
Accel
ErrorDetails
StatePtr
IsCharging
BatteryLevel
- The following static properties have been deprecated and are replaced by a single
TouchPos
instance property onGvrControllerInputDevice
that returns center relative touch coordinates:GvrControllerInput.TouchPosCentered
(center is(0, 0)
) ->TouchPos
(center is(0, 0)
)GvrControllerInput.TouchPos
(top-left is(0, 0)
) ->TouchPos
onGvrControllerInputDevice
(center is(0, 0)
)
- The following static methods have been replaced by similarly named
GvrControllerInputDevice
instance methods. Method names have been changed for consistency with Unity's Input API:GvrControllerInput.IsTouching()
->GetButton(GvrControllerButton.TouchPadTouch)
GvrControllerInput.TouchDown()
->GetButtonDown(GvrControllerButton.TouchPadTouch)
GvrControllerInput.TouchUp()
->GetButtonUp(GvrControllerButton.TouchPadTouch)
GvrControllerInput.ClickButton()
->GetButton(GvrControllerButton.TouchPadButton)
GvrControllerInput.ClickButtonDown()
->GetButtonDown(GvrControllerButton.TouchPadButton)
GvrControllerInput.ClickButtonUp()
->GetButtonUp(GvrControllerButton.TouchPadButton)
GvrControllerInput.AppButton()
->GetButton(GvrControllerButton.App)
GvrControllerInput.AppButtonDown()
->GetButtonDown(GvrControllerButton.App)
GvrControllerInput.AppButton()
->GetButtonUp(GvrControllerButton.App)
GvrControllerInput.HomeButtonDown()
->GetButtonDown(GvrControllerButton.System)
GvrControllerInput.HomeButtonState()
->GetButton(GvrControllerButton.System)
- The following static properties are available, with the same name, as
Behavioral changes
HeadsetDemoManager
debug logging of safety region and floor height is now off by default.
Other changes
- Added support for positionally tracked headsets in Instant Preview.
- Updated bundled lib GVR for Android to v1.150.0.
- Fixed IPreprocessBuild and IPostrocessBuild obsolete warnings in Unity 2018.x.
- Added null checks on
safetyRing
inHeadsetDemoManager
. - Added source code for native libs
gvr-exoplayersupport
,gvr-keyboardsupport
,gvr-permissionsupport
, andvideo_plugin
to the git repo. Addresses issues 437 and 556.
Experimental features
Bug fixes
- Fixed issue 822 where the permission request could result in a crash after the permission had been granted.
- Fixed issue 835. The
GvrEditorEmulator
was previously allocating memory every frame, and should now only allocate onAwake()
. - Fixed issue 865 where
GvrVRHelpers.GetHeadRotation()
didn't work with Instant Preview. - Fixed issue 888. Added a console warning when trying to use a
GvrTrackedController
without aGvrControllerInput
. - Fixed issue 917 where using
GVRKeyboard
when building with IL2CPP would throwNotSupportedException
. - Fixed issue 918 where adding a new
GVRKeyboard
component after destroying one will cause a crash. - Fixed the pointer reticle not showing up properly on all of the demo scenes that use the CubeRoom prefab.
- Fixed missing Instant Preview newlines characters in standard output and standard error console messages.
GVR SDK for Unity v1.130.1
Bug fixes
* Fixed build error (issue 877) when Unity iOS player support is not installed.
GVR SDK for Unity v1.130.0
Breaking changes
- None
Deprecations
- None
Behavioral changes
- Using the Google VR keyboard no longer disables positional headtracking on Standalone headsets. Removed
InputTracking.disablePositionalTracking = true
from theAndroidNativeKeyboardProvider
constructor.
Other changes
- Changed the default value for
maxReticleDistance
onGvrReticlePointer
from10.0f
to20.0f
. - Fix compilation errors (issue 861) in Unity 2018.1 and newer.
- Fix compile time warnings due to member hiding inerherited member.
- Updated bundled lib GVR for Android to v1.130.0.
Bug fixes
- Fix iOS crash when trying to use camera to scan QR codes (issue 326). Added build postprocessor to add
NSCameraUsageDescription
to Info.plist. - GVR keyboard now sends touch updates, fixes CJK language suggestions bar.
- Fixed permission flow samples to prevent leaking
ServiceConnection
to Google VR Services by properly closingDaydreamApi
instance. - Fix InstantPreview APK version check, so that previously installed APKs are correctly updated by newer ones.
GVR SDK for Unity v1.120.0
Breaking changes
- None
Deprecations
- The
GvrAudio*
components remain deprecated in Unity 2017.1 or later. However, the SDK no longer displays deprecation warnings in Unity 5.6, as upgrading to Resonance Audio (developers.google.com/resonance-audio/migrate) requires Unity 2017.1 or later.
Behavioral changes
- The Daydream controller dynamic tooltip graphics provided by the GvrControllerTooltipsTemplate prefab have been updated to match the simple tooltip graphics provided by the GvrControllerTooltipsSimple prefab.
Other changes
- Added a setter (issue #813, PR #814) to the GvrKeyboard EditorText.
- Added new prefab developer reference documentation.
- GVRDemo has been updated and renamed to HelloVR with refreshed assets and safety cylinder visualization on Standalone devices.
- Controller assets have been updated to a more optimized mesh and updated texture.
- Updated bundled lib GVR for Android to v1.120.0.
- Added
CurrentDistance
readonly property to classGvrLaserVisual
. - Added
SetControllerTexture
method to classGvrControllerVisual
to toggle it at runtime. - Updated
README
to link to https://github.com/googlevr/gvr-unity-sdk/releases for latest SDK and release notes.
Bug fixes
- Fixed issue #778 where
GvrEditorEmulator
would not function without theGvrControllerMain
prefab in the scene. - Fixed a bug where calling
GvrCardboardHelpers.Recenter
would not recenterGvrEditorEmulator
in the editor. - Fixed issue resonance-audio/resonance-audio-unity-sdk#7 where the
GvrAudio*
components would cause a crash in the Unity Editor when the target platform is selected to iOS.