Search Unity

Error: "To use the controller, please upgrade to a version of Unity with the GVR native integration"

Discussion in 'Daydream' started by Tuism, Mar 11, 2017.

  1. Tuism

    Tuism

    Joined:
    Oct 23, 2013
    Posts:
    28
    Hi there, so I followed these instructions (https://blogs.unity3d.com/2016/09/22/daydream-technical-preview-available-now/) but instead of the Technical Preview I installed 5.6 beta. I have Pixel XL and so connected my Daydream controller instead of a phone with emulator.

    When I get into the Editor and load up the demo scene, and run it, I get this message:
    "To use the controller, please upgrade to a version of Unity with the GVR native integration"

    Not entirely sure what this means, I've googled around a bit and on these forums, and have found no joy. Help? Much appreciated!
     
  2. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    The controller is only usable with the Google SDK for Unity that Google ships separately. Install that Unity package and try again.
     
  3. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    I just upgraded to the latest unity version 5.6.0f3

    I imported the google cardboard sdk from

    https://developers.google.com/vr/unity/

    I also notice that when i check "Virtual Reality Supported" in the player settings, cardboard is not listed even after i imported the cardboard sdk.

    When i run the cardboard demo from the sdk i get the same error message as listed above.

    So are you saying that in order to use cardboard i have to install a special version of unity, even though i have the latest unity version?
     
  4. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    I also notice that when i check "Virtual Reality Supported" in the player settings, cardboard is not listed even after i imported the cardboard sdk.

    Have you set your build target to Android? That should be all you need to do to target Cardboard.
     
  5. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    ok, awesome, i will try that, many thanks, does cardboard also with IOS, WINDOWS, and MAC?
     
  6. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    Cardboard only runs on iOS and Android AFAIK.
     
  7. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    So you have to have a different VR sysem in your code when you run on windows or mac?

    Is there one system that can be used for all?
     
  8. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    No there isn't one system that can be used for all, but they aren't apples to apples anyway. Rift and Vive have positional tracking. Gear VR and daydream have motion controllers, and cardboard just has the HMD.

    That being said at least for daydream the gvrcontroller component has an emulator for in editor and the controller. As far as the message native integration with cardboard in a non beta version started in 5.6
     
  9. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    So how do you write code for all these different systems? Do you have to install every SDK, and then let the user select which one to use in a menu?

    Or do you tell the user that they must buy this or that VR hardware? isnt there a standard for the VR hardware? Sorry to ask all this, only today I just started to put VR into my project so i know zero about it.
     
  10. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    I'm sure Unity eventually will get everything in a unified API but that is probably a ways off. There a two main things unique to VR and a bunch of minor things. The two main things are rendering and input.

    For rendering Unity mostly has this fairly well unified. When you check the Virtual Reality supported and add the virtual reality sdk (which is really a native assembly) Unity does a fairly good job unifying this for you. When you check that box your camera gets a dropdown for left eye, right eye, both, or none. For the most part these settings tend to hide things from you pretty well on the various optimizations each platform and all you need is to set the appropriate setting in the camera. If you start having performance issues you can certainly use each platforms Unity utilites for optimizations but you might not have to go down this path if Unity's performance is good enough. It feels like Unity's current main focus is still on making better and better performance/tricks here as well as it should be because this is going to make the biggest difference right now.

    For Input things are for the most point nonexistent. If you grab the latest Unity and look under Unityengine.VR namespace you will for input only see a few things there (position, rotation, etc.). At least currently I don't feel it's worth using any of this for anything other than a basic game because I don't know of a single VR input scheme that is adequately covered. On PC with the rift and the vive you want things like boundaries, On mobile with Gear VR and Daydream you want other things like acceleration, angular acceleration, whether orientation has been reset, etc. So yes when it comes to input things are very much integrate the "utilities" (not the same as the native sdk) for each platform you use. Unity will probably eventually get there but I think there big push will be at the same time for their new input system but that still feels a ways off (probably at least a year). In the meantime I hope to start unifying input on the asset store at least (starting with unifying the daydream and the gear vr) due to be out in a few weeks. That being said there really are 3 different input schemes between the main 5 players. PC has positional tracking, Daydream and Gear VR have motion controllers, and Cardboard just has the head. Within the schemes a lot can be unified, but across them they are very different hence your controls need to be different.
     
  11. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    Thanks so much for your help, i didnt know the inputs were so diverse s you mentioned.

    In your second paragraph, second sentence you said "When you check the Virtual Reality supported and add the virtual reality sdk ..."

    you mention installing a "virtual reality SDK". I never seen this sdk, where do i get it from?

    Also for my game, the user needs to login by typing in their name password etc. Also during the game they need to type in some information. I dont see how all that is possible with VR because there are two controllers, one for each hand, so how can they type?? and for cardboard its even worse, there is no keyboard at all as far as i can see.

    Thanks again, sorry to bother you!
     
    Last edited: May 2, 2017
  12. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    The virtual reality sdk is automatically added by Unity to your build for all the ones you added to the player settings after you've checked virtual reality supported. This is not to confused with the utilities that are usually imported into your project from the vendor's website from a unitypackage they provide.

    As far as a keyboard goes it depends on the VR vendor. Some have it in their utilities, but others don't. Depending on which platforms you are building for you might want to check. If they all have it great. If not I wouldn't bother with any of them and just use one of the ones off the asset store (some are free) and raycast to the keyboard via a Unity UI.
     
  13. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    awesome thanks very much!