Objective
About the specific use of the Google VR SDK, Portal [Gvr]google VR SDK for Unity (i)
Google Daydream Platform has been integrated into the Google VR SDK
This article environment: Unity5.3.1 x64, GVR SDK 0.8, VS2013
Word translation
Stereo: three-dimensional; pose: posture; gaze: gaze, gaze,reticle: crosshair, crosshair;Responder: respondent;
provider: provider;providerfactory: Factory class; Emulator: Emulator, Emulator
Perspective: Perspective, 3D camera;orthographic: orthogonal, 2D camera;
Script reference
Scripts\
Gazeinputmodule
Implementing the UnityEngine.UI.BaseInputModule Interface (Baseinputmodel inherits from UnityEngine.UI.UIBehaviour)
So Ugui elements in the selected or trigger, touching triggered events, can be passed out.
Gvreye
Control Stereo Single Camera
Gvrhead
Provides data for head tracking to the camera, and the transform properties attached to it during head movement also change synchronously.
Gvrpostrender
Performing distortion correction for rendering stereoscopic images
Gvrprerender
Clears the entire screen.
principle: Clear Flags determines which parts of the screen will be cleared. This is to facilitate the use of multiple cameras to draw different game elements
Gvrprofile
Gvrview
Information transmission of the headset display device
Pose3d
Stereocontroller
Binding on Maincamera, two gvreye rendering stereo view content controller
Stereorendereffect
Scripts\audio\
Gvraudio
Responsible for communication of GVR audio class and system native audio system
Gvraudiolistener
The GVR Audio listener component improves audio listeners and provides advanced space audio capabilities.
Gvraudioroom
GVR Audio Room component, simulating the environmental impact of the room to the gameobject that binds this component
Gvraudiosource
The GVR Audiosource component is enhanced to provide Audiosource with advanced space audio capabilities.
Scripts\controller\
Gvrcontroller
Main portal of the GVR Controller API
Scripts\controller\internal\controllerproviders
Scripts\controller\internal\emulator
Simulator
Scripts\ui\
Gvrgaze
Class that can perform gaze-based selection, as a simple alternative to the more complicated path of using Gazeinputmo Dule and the rest of Ugui.
Can perform a crosshair-selected operation, rather than using Gazeinputmodule, as a simple alternative
Gvrreticle
When the user stares at any object, draw a crosshair before the object
Scripts\vrdevices\
Simulations including various platforms and operating environments
Interface
Igvrgazepointer
Provides an interface for Gazeinputmodule, which defines the processing function of the input and output
Primary logic processing in gazeinputmodule.updatereticle
if (Gazeobject = = previousgazedobject) {ifnull) { Gazepointer.ongazestay ( Camera, Gazeobject, Intersectionposition, isinteractive); Else { ifnull) { gazepointer.ongazeexit (camera, previousgazedobject); } if NULL { Gazepointer.ongazestart (camera, Gazeobject, Intersectionposition, isinteractive);} }
Igvergazeresponder
Provides an interface for Gvrgaze, which defines the trigger event for gaze
Three methods ongazeenter ongazeexit ongazetrigger when the crosshair is aligned with any gameobject, see the GvrGaze.cs Handlegaze
Resources
Resources\solidcolor.shader Solid Color fill
Resources\unlittexture.shader no light map
distortion\gvrdistortion.cginc Twisted Shader
Resources\ui\Gvrreticleshader.shader crosshair, cross line shader
Resources\gvraudiomixer.mixer audio file
Pluginsandroidmanifest.xml
<android:minsdkversion= " android:targetsdkversion"= "All" />
Google.ProtocolBuffers.dll
Make Android API available to Unity call
plugins\android\Unity GVR Activity.aar
plugins\android\Gvr_android_common.aar
Plugins\android\libs\armeabi-v7a\libgvrunity.so
Unitygvractivity_classes.jar
Gvr_android_common_classes.jar
AAR file
*.aar is a compressed file, similar to *.jar, but it can contain resource files, samples, drawable, XML resources
Jd-gui
Java Anti-compilation tool jd:http://jd.benow.ca/
If you run a Jd-gui report error
Solutions
1. Please download and install the JRE 1.7.0
2. Copy the Jd-gui.exe to the JRE installation path and you can double-click to run the
attached
JAVA7 archive Download: http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html? Sssourcesiteid=otncn
Java Archive: http://www.oracle.com/technetwork/java/javase/archive-139210.html
GVR api:google VR for Unity SDK Script Reference
Set up a Daydream development kit:https://developers.google.com/vr/concepts/dev-kit-setup
Information
Google, Unity and other company experts in-depth interpretation of VR platform daydream:https://yq.aliyun.com/articles/54066
GVR SDK for Unity (ii)