This repository has been archived by the owner on Nov 8, 2019. It is now read-only.
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.