Installing:
- Install Unity Daydream (Technical Preview or higher). Make sure that when you install the feature is enabled "Android Build Support" for Android and "iOS Build Support" for iOS. To build VR applications for iOS, you can use the normal Unity editor version 5.2.1 and above.
- Create a new project. Choose the right platform for the project (Android, iOS).
- Download and import the Google plugin VR SDK for Unity. The recommended version 1.10.0. Configure the plugin using the tutorial by Google.
- Import plugin GVRNavi. To explore the plugin to use the demo scene, located in the directory "GVRNavi/Examples/Scen
Using:
1. To place on the stage of the prefab with the controller of the player "GVRNavi/Prefabs/VRPlayer". Script VRPlayerController contains the base logic of the controller of the character. Child objects in the prefab are:
- the main camera of the scene;
- object VRReticlePointer, which is a graphical display of the Central point of view of the player.
VRReticlePointer component Settings in the inspector allow you to choose the mode of interaction of the player with the VR-objects in the scene, and specify the amount of scaling of the graphical pointer sight of the player;
- object 3D_UI, which is a container for VR-objects that make up a three-dimensional spherical menu that surrounds the player. VR3DRoot script contains the logic for processing VR-rings, consists of a spherical menu, their scaling, positioning, expand/collapse.
2. To make a spherical menu of the components placed in the directory "GVRNavi/Prefabs":
-
VRRingSimple – simple ring, designed to activate simple functions. The user can assign the function call to an event getting the scope in the scope rings, the output event of the sight of the area and the activate event ring. Script VRRingSimple allows you to adjust the time focus the eyes on the ring, required to activate the ring size of the ring in collapsed and expanded state, color, and opacity of the ring in various States. You also need to assign main camera of a scene in the script FloorPanelRotation.cs.
-
VRRingContainer – ring which may contain a subsidiary of VR-objects. The user can assign the function call to an event getting the scope in the scope rings, the output event of the sight of the area and the activate event ring. Script VRRingContainer allows you to adjust the time focus the eyes on the ring, required to activate the ring size of the ring in collapsed and expanded state, color, and opacity of the ring in various States, transparency is a subsidiary of VR-objects to fill the list of child objects. You also need to assign main camera of a scene in the script FloorPanelRotation.cs.
-
VRButton – button, which can be a standalone object anywhere in the scene and the child object of the composite ring.
to add a button on the ring, you must move prefab button on the stage, putting the parent object is the root of composite rings "VRRingContainer/Root". The user can assign the function call to the event of contact with a target area of the button, the exit event of the scope of the field and the event activation (pressing) of a button. Script VRButton allows you set the time focus look at the button required to activate it (pressing), sprite buttons, the button color in various states.
-
VRToggle – switch, which can be as an independent object in any scene, and the child object of the composite ring. To add a switch on the ring, you must move the switch prefab on stage, putting the parent object is the root of composite rings "VRRingContainer/Root". The user can assign the function call to the event of contact with a target area of the button, the exit event of the scope of the field and the event activation (pressing) of a button. Script VRToggle allows selection of the focus view of the switch required to activate it (toggle), sprites switch, color switch in different States, the standard value switch (on/off).
-
VRScrollBar – scrolling, which can be as an independent object in any scene, and the child object of the composite ring. To add scrolling on the ring, you must move the scroll prebuf on stage, putting the parent object is the root of composite rings "VRRingContainer/Root". The user can assign the function call to an event getting the sight in the scroll region, an output event of the scope of the field and the event activation (pressing) of the movable scroll element. Scrolling is also a composite object that has child objects for two buttons VRButton. Script VRScrollBar allows you to adjust the time focus a look at best personal Finance required to activate the movable element, sprites, background and a movable element, color scrolling in various States, the standard position of the movable element, transparency, a subsidiary of VR-object, list of child objects (which by default includes two buttons VRButton).
3. To create your own VR object, you must create a script inherited from class VRObjectGaze, and implements the interface IGvrGazeResponder. A VR object must contain a Collider component. Interface implementation IVRContainer allows to correctly assign to a VR object in the child VR objects.
Addition:
For rendering sprites VR-objects in the spherical menu use a Shader GVRNavi AdditiveZTest, which disabled the depth test. Therefore, the menu items will be visible to the player, even if on stage they overlap another object. If you are using these VR objects like buttons, checkboxes and scrollbar spherical out the menu, you must assign a material with a Shader that uses the depth test (e.g., GVRNavi Additive).