Hey guys, I just noticed this has now released. There are a few things missing I'm still testing things out. The old trusty prefab GvrViewerMain is gone completely. So if you were reliant on GvrViewer there might be some work arounds you need to put in place. These are not in the current tutorial on the google VR SDK site as yet. The latest can be gotten from their GIT.
I see "Instances of GvrViewerMain in scenes will change to GvrEditorEmulator. automatically. This will not affect on-device builds." https://developers.google.com/vr/unity/release-notes
Yeah looks to be some editor stuff as mentioned above, a few audio things, removing a ton of the old legacy scripts, and a much better keyboard. Looks to be all self contained as well, with no changes to the native assembly underneath.
Ok. My camera issue was a simple fix. I have my camera as a child of another object and the mono camera was not taking the camera location I had. So I just set the parent object co-ordinates at the correct location and adjusted everything below it accordingly.
I was setting up GVR in script: Code (CSharp): // LOAD PREFAB const string sPrefabPath = "GoogleVR/MAIN_GOOGLEVR"; Object oPrefab = Resources.Load(sPrefabPath); if (!oPrefab) { LOGW("CANT LOAD PREFAB " + sPrefabPath); return false; } // INSTANTIATE PREFAB v.oGVR = (GameObject)Instantiate(oPrefab); if (!v.oGVR) { LOGW("CANT INSTANTIATE PREFAB!: " + sPrefabPath); return false; } // GET CODE v.cGVR = v.oGVR.GetComponent<GvrViewer>(); if (!v.cGVR) { LOGW("CANT GET GvrViewer SCRIPT!: " + sPrefabPath); return false; } //BIND GVR NECK TO PLAYERS NECK v.oGVR.transform.parent = this.transform; // DONE v.oGVR.tag = main.K_TAG_CAMERA_GVR; v.oGVR.name = main.K_TAG_CAMERA_GVR; LOGM("ENABLED GVR"); return true; Anyone know what I should do to setup via script now?
- Prefab Path should be GoogleVR/Prefabs/GvrEditorEmulator - GvrViewer has been removed, I think this is essentially replaced now with Unity's VRSettings API: https://docs.unity3d.com/ScriptReference/VR.VRSettings.html I made a small video about some updates, but I don't have Daydream so I only cover Cardboard stuff:
Thx @Selzier For anyone wanting to instantiate GVR fully runtime. You've just got to addComponent GvrEditorEmulator and GvrController to some game object, I add them both to my VR neck root object, the object I child to avatar skeleton neck transform. I dont think GvrEditorEmulator is needed for Android build but you can include it and it just sits quietly. Then you call static member functions on the classes to access APIs same as before.
I can't get the enemy follow the camera. It runs towards the main camera but Gvreditoremulator is being used as displaying the main camera in game! So, basically there are two cameras , one which the enemy follows and other the vremulator camera which is far from the main camera and is used to display the game! I want the enemy to follow Gvreditoremulator camera which is used for displaying. I'm a beginner in unity!
http://answers.unity3d.com/questions/1407669/camera-is-dislocated-after-build.html Can you help me with this problem??