Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

GVR 1.5 released

Discussion in 'AR/VR (XR) Discussion' started by Mistabullit, May 17, 2017.

  1. Mistabullit

    Mistabullit

    Joined:
    Aug 14, 2015
    Posts:
    7
    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.
     
  2. Selzier

    Selzier

    Joined:
    Sep 23, 2014
    Posts:
    652
    Liinnkk and Mistabullit like this.
  3. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    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.
     
  4. Mistabullit

    Mistabullit

    Joined:
    Aug 14, 2015
    Posts:
    7
    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.
     
  5. SiliconDroid

    SiliconDroid

    Joined:
    Feb 20, 2017
    Posts:
    302
    I was setting up GVR in script:

    Code (CSharp):
    1.                    
    2.     //  LOAD PREFAB
    3.     const string sPrefabPath = "GoogleVR/MAIN_GOOGLEVR";
    4.     Object oPrefab = Resources.Load(sPrefabPath);
    5.     if (!oPrefab)
    6.     {
    7.         LOGW("CANT LOAD PREFAB " + sPrefabPath);
    8.         return false;
    9.     }
    10.    
    11.     //  INSTANTIATE PREFAB
    12.     v.oGVR = (GameObject)Instantiate(oPrefab);
    13.     if (!v.oGVR)
    14.     {
    15.         LOGW("CANT INSTANTIATE PREFAB!: " + sPrefabPath);
    16.         return false;
    17.     }
    18.    
    19.     //  GET CODE
    20.     v.cGVR = v.oGVR.GetComponent<GvrViewer>();
    21.     if (!v.cGVR)
    22.     {
    23.         LOGW("CANT GET GvrViewer SCRIPT!: " + sPrefabPath);
    24.         return false;
    25.     }
    26.    
    27.     //BIND GVR NECK TO PLAYERS NECK
    28.     v.oGVR.transform.parent = this.transform;
    29.    
    30.     //  DONE
    31.     v.oGVR.tag = main.K_TAG_CAMERA_GVR;
    32.     v.oGVR.name = main.K_TAG_CAMERA_GVR;
    33.     LOGM("ENABLED GVR");
    34.     return true;
    35.  
    Anyone know what I should do to setup via script now?
     
    Last edited: May 17, 2017
  6. Selzier

    Selzier

    Joined:
    Sep 23, 2014
    Posts:
    652
    - 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:
     
    SiliconDroid likes this.
  7. SiliconDroid

    SiliconDroid

    Joined:
    Feb 20, 2017
    Posts:
    302
    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.
     
    Last edited: May 19, 2017
  8. rohan871

    rohan871

    Joined:
    Sep 22, 2016
    Posts:
    2
    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!
     
  9. arabadziev

    arabadziev

    Joined:
    Jun 2, 2017
    Posts:
    1