Search Unity

Google VR SDK 1.10 + Unity 5.5 broken?

Discussion in 'AR/VR (XR) Discussion' started by A_Savvidis, Dec 9, 2016.

  1. norbertots

    norbertots

    Joined:
    Jul 4, 2014
    Posts:
    15
    when build the GoogleVR i got errors:

    C:\Program Files\Java\jdk1.8.0_121\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="E:/AD/sdk\tools" -Dfile.encoding=UTF8 -jar "E:\Unity550p3\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -

    stderr[

    ]
    stdout[
    Warning: [Temp\StagingArea\AndroidManifest-main.xml:14, F:\ForNorberto\Temp\StagingArea\android-libraries\gvr-permissionsupport-release\AndroidManifest.xml:3] Main manifest has <uses-sdk android:targetSdkVersion='21'> but library uses targetSdkVersion='24'
    Warning: [Temp\StagingArea\AndroidManifest-main.xml:14, F:\ForNorberto\Temp\StagingArea\android-libraries\unitygvractivity\AndroidManifest.xml:2] Main manifest has <uses-sdk android:targetSdkVersion='21'> but library uses targetSdkVersion='22'
    ]
    exit code: 1
    UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.HostView:OnGUI()

    what i nedd to build to Android ???
     
  2. mira_leung

    mira_leung

    Official Google Employee

    Joined:
    May 17, 2016
    Posts:
    70
    If you are building for Daydream, you need a version of Unity with the native GVR integration (technical preview or 5.6.0b4), and target SDK level 24.

    Otherwise, the Permissions sample isn't supported in Cardboard, so removing the relevant library under Assets/Plugins/Android should fix the first error. For the second, setting the target SDK version to 22 or up should fix that.
     
  3. Peanutbutteer

    Peanutbutteer

    Joined:
    Dec 24, 2016
    Posts:
    1
    I has problem on VideoDemoScene with "Video Support libraries not found or could not be loaded! Please add the GVRVideoPlayer.unitypackage to this project" when running
    01-28 02:01:19.655 2549-2580/com.Company.GGVRDemo E/Unity: Unable to find gvrvideo
    01-28 02:01:19.721 2549-2580/com.Company.GGVRDemo E/Unity: System.DllNotFoundException: gvrvideo
    at (wrapper managed-to-native) GvrVideoPlayerTexture:CreateVideoPlayer ()
    at SwitchVideos.Awake () [0x0004d] in /Users/satjawatpanakarn/GVRDemo/Assets/GoogleVR/Demos/Scripts/VideoDemo/SwitchVideos.cs:39
    UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
    UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    UnityEngine.Logger:Log(LogType, Object)
    UnityEngine.Debug:LogError(Object)
    SwitchVideos:Awake() (at /Users/satjawatpanakarn/GVRDemo/Assets/GoogleVR/Demos/Scripts/VideoDemo/SwitchVideos.cs:49)

    (Filename: /Users/satjawatpanakarn/GVRDemo/Assets/GoogleVR/Demos/Scripts/VideoDemo/SwitchVideos.cs Line: 49)

    and i ready has import GVRVideoPlayer.package
     
  4. zihancheng

    zihancheng

    Joined:
    Jan 31, 2017
    Posts:
    1
  5. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    228
    스크린샷 2017-02-02 15.46.54.png

    macOS 10.12.3 (latest at the moment)
    Unity 5.5.1p1
    GoogleVR 1.10.0

    ++ I have this weird error lately on Unity 5.6.0b5
    스크린샷 2017-02-02 15.47.03.png
    Rendering is corrupted. Looks like a distortion correction issue.
     
    Last edited: Feb 2, 2017
  6. A_Savvidis

    A_Savvidis

    Joined:
    Jul 21, 2016
    Posts:
    98
    Nope it looks like a multiple camera issue. Having two cameras (for example one for game and another rendering the UI) works fine in 1.03 GVR. In 1.10 I had the same issues where one eye would be divided into two eyes in a way
     
  7. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    228
    Hi @Synthercat,
    the same project on Unity5.5 doesn't show this error. And I don't have multiple cameras on my scene. It has only one MainCamera.

    I've upgraded to Unity5.6.0b6 and now GvrEye.cs shows warning message as this :
    ** ignore the warning message above. I'm merging vuforia with GoogleVR for my project. The rendering doesn't work as expected with 'clean' GoogleVR 1.10.0 anyway
     
  8. A_Savvidis

    A_Savvidis

    Joined:
    Jul 21, 2016
    Posts:
    98
    You could try 1.20 SDK that got released hours ago
     
  9. gerardreches

    gerardreches

    Joined:
    Feb 2, 2017
    Posts:
    8
  10. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,363
    I tried to install the Google VR unity package on Unity 5.6 beta and it crashed. It worked with Unity 5.5 though. (Unity 5.6.0b6)
     
  11. gerardreches

    gerardreches

    Joined:
    Feb 2, 2017
    Posts:
    8
    You don't need to import the Google VR SDK in Unity 5.6, it's already included natively, just open Player Settings > Android > check Virtual Reality supported and add Cardboard or Daydream to the list.
     
  12. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,363
    But how to I get the GVRviewer then without importing the Google VR package? to see the stereoscopic view? I tried to import the package because I wanted all the examples and demo scenes etc. https://developers.google.com/vr/unity/download So I can't see the demo scenes in Unity 5.6???

    (Also, it shouldn't crash either way!)
     
  13. Selzier

    Selzier

    Joined:
    Sep 23, 2014
    Posts:
    652
    Not only the demo scenes, but you also don't get any Gaze Input System, pointer reticle, FPS monitor scripts, etc. :)

    Last time I tried 5.6 or the GVR technical preview, there we no practical solutions for GoogleVR / Google cardboard. I don't suggest using 'native cardboard' (5.6, gvr-tech-preview) unless you absolutely have to publish to Daydream. Gvr 1.20 with Unity 5.5.1 works great.
     
    yoonitee likes this.
  14. gerardreches

    gerardreches

    Joined:
    Feb 2, 2017
    Posts:
    8
    With the native integration you doesn't need the GVRviewer, you will not see the stereoscopic view when play on the editor, but when you export the app to android it will be in stereoscopic view. I'm sure that there should be an option to see the stereoscopic view in the editor too.
     
  15. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,363
    Ah, I see. Well that's no good for me. Because I was trying to use Google glass lenses directly on the laptop screen for a quick preview.

    Maybe Unity could add the stereoscopic view as a built in feature for the Unity 5.6 release. that would be nice.
     
  16. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    228
    Wow, that looks cool. But what if I want to develop VR app for both Android and iOS? For iOS I have to add GVR since Unity doesn't natively support vr for iOS.
     
  17. image28

    image28

    Joined:
    Jul 17, 2013
    Posts:
    457
    GVR 1.20 is out, and it fixed the flickering issue with all skyboxes I was having :)
     
  18. mira_leung

    mira_leung

    Official Google Employee

    Joined:
    May 17, 2016
    Posts:
    70
    NGC6543 likes this.
  19. ThomasVandenberghe

    ThomasVandenberghe

    Joined:
    Feb 28, 2014
    Posts:
    22
    I've tried using the unity plugin from this site https://developers.google.com/vr/unity/ together with Unity 5.4.2f2-GVR13 and while it works great on android, on the iOS version the rendering is done on 1 camera instead of stereo. Is there any way I could get it to render it correctly?

    This are the logs when starting the demo scene on iOS (iPhone 5 with iOS 9.3.1)

    2017-02-07 11:00:44.669 wildcat[435:119173] -> registered mono modules 0x101118a90
    2017-02-07 11:00:44.892 wildcat[435:119173] You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
    -> applicationDidFinishLaunching()
    2017-02-07 11:00:45.460 wildcat[435:119173] [Crashlytics] Version 3.8.3 (120)
    -> applicationDidBecomeActive()
    GfxDevice: creating device client; threaded=1
    Init: screen size 1136x640
    Initializing Metal device caps: Apple A7 GPU
    Initialize engine version: 5.4.2f2-GVR13 (4fafc0726c6d)
    The referenced script on this Behaviour is missing!

    (Filename: Line: 1510)

    The referenced script on this Behaviour is missing!

    (Filename: Line: 1510)

    The referenced script on this Behaviour is missing!

    (Filename: Line: 1510)

    The referenced script on this Behaviour is missing!

    (Filename: Line: 1510)

    The referenced script on this Behaviour is missing!

    (Filename: Line: 1510)

    The referenced script on this Behaviour is missing!

    (Filename: Line: 1510)

    The referenced script on this Behaviour is missing!

    (Filename: Line: 1510)

    The referenced script on this Behaviour (Game Object 'Controller') is missing!

    (Filename: Line: 1656)

    A script behaviour (probably GvrArmModelOffsets?) has a different serialization layout when loading. (Read 32 bytes but expected 48 bytes)
    Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?

    (Filename: Line: 1764)

    The referenced script on this Behaviour (Game Object 'ddcontroller') is missing!

    (Filename: Line: 1656)

    A script behaviour (probably GvrControllerVisual?) has a different serialization layout when loading. (Read 32 bytes but expected 116 bytes)
    Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?

    (Filename: Line: 1764)

    The referenced script on this Behaviour (Game Object 'Tooltips') is missing!

    (Filename: Line: 1656)

    A script behaviour (probably GvrToolTips?) has a different serialization layout when loading. (Read 32 bytes but expected 128 bytes)
    Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?

    (Filename: Line: 1764)

    The referenced script on this Behaviour (Game Object 'GvrControllerMain') is missing!

    (Filename: Line: 1656)

    A script behaviour (probably GvrArmModel?) has a different serialization layout when loading. (Read 32 bytes but expected 56 bytes)
    Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?

    (Filename: Line: 1764)

    The referenced script on this Behaviour (Game Object 'GvrControllerMain') is missing!

    (Filename: Line: 1656)

    A script behaviour (probably GvrController?) has a different serialization layout when loading. (Read 32 bytes but expected 36 bytes)
    Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?

    (Filename: Line: 1764)

    The referenced script on this Behaviour (Game Object 'Laser') is missing!

    (Filename: Line: 1656)

    A script behaviour (probably GvrLaserPointer?) has a different serialization layout when loading. (Read 32 bytes but expected 68 bytes)
    Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?

    (Filename: Line: 1764)

    The referenced script on this Behaviour (Game Object 'Laser') is missing!

    (Filename: Line: 1656)

    A script behaviour (probably GvrArmModelOffsets?) has a different serialization layout when loading. (Read 32 bytes but expected 48 bytes)
    Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?

    (Filename: Line: 1764)

    UnloadTime: 2.557458 ms
    GVR Unity SDK Version: 1.1

    (Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

    Built-in distortion correction disabled. Causes: [Requires OpenGL]
    GvrViewer:InitDevice()
    GvrViewer:Awake()

    (Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
     
  20. mira_leung

    mira_leung

    Official Google Employee

    Joined:
    May 17, 2016
    Posts:
    70
    The iOS integration is not in yet (coming in a future 5.6 beta), so you will need to import the backwards compatibility package (under Assets/GoogleVR) and build from a non-native integration Unity version such as the mainline 5.4.
     
  21. pratham2504

    pratham2504

    Joined:
    Dec 13, 2016
    Posts:
    7
    I'm also facing issues with latest verion of SDK. Where can I download GVR SDK 1.03 from??
     
  22. Akshara

    Akshara

    Joined:
    Apr 9, 2014
    Posts:
    100
    https://github.com/googlevr/gvr-unity-sdk

    Then click on "33 commits" under where it says Google VR SDK for Unity and above where it says Branch: master.

    Then where it says GVR Unity SDK v1.0.3 click on the "< >" button on the far right. That takes you to a version of the repository from a previous date, v1.0.3 in this case.

    Then finally click on the green "Clone or download button" and select Download Zip.
     
    Last edited: Feb 13, 2017
    pratham2504 likes this.
  23. metaphysician

    metaphysician

    Joined:
    May 29, 2012
    Posts:
    190
    hey there, just trying to get some clarification here. i downloaded the 5.6 beta (unpatched i think), and by itself there does not appear to be any GVR Spatializer there. should i be using the SDK with Unity 5.51 instead of 5.6?
     
  24. mira_leung

    mira_leung

    Official Google Employee

    Joined:
    May 17, 2016
    Posts:
    70
    The GVR Audio spatializer is included with the GVR Unity SDK, and you can find the prefabs and scripts under Assets/GoogleVR/{Prefabs, Scripts}/Audio respectively. The settings also appear in Project Settings > Audio if that's what you're looking for.

    As for the GVR Unity SDK, we currently support 5.2.1, 5.3.3, 5.4, 5.5, Daydream Technical Preview (5.4.2f2-GVR13), and 5.6 beta. The last two support both Cardboard and Daydream and have the native integration. The other versions support only Cardboard and require importing the backwards compatibility package.

    Hope that helps. :)
     
  25. pratham2504

    pratham2504

    Joined:
    Dec 13, 2016
    Posts:
    7
    I
    have the same distortion issue currently with 5.6.0b7
     
  26. pratham2504

    pratham2504

    Joined:
    Dec 13, 2016
    Posts:
    7
    It shows the size of the ZIP file is 839 MB. Is it normal coz the normal GVR SDK for Unity is around 70-75MB??
     
  27. pratham2504

    pratham2504

    Joined:
    Dec 13, 2016
    Posts:
    7
    Never mind the above.. The Unity package was about 50Mb only.. All the files collectively took that much space.. Thanks anyway.. :)
     
  28. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    228
    Ah, I remembered that prior Cardboard SDKs(ver 0.5 i think) couldn't handle shaders using Grab pass. It just draws black(white? I don't remember..) and it's completely unusable. How about now? Still won't work?
     
  29. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    228
    @mira_leung, I recently noticed that my app is missing the default Cardboard UIs (back button, vertical line, viewer profile gear icon...) and I can't change the viewer anymore. I tried to call the ShowSettingsDialog() in GvrViewer.cs, but it won't work either.
    It looks like the Cardboard UIs are created 'externally' (extern void createUiLayer(id app, UIView* view) on CardboardAppController.mm) and the method is called on @implementation (I didn't changed anything), but it won't work.
    I'm trying to figure out what would be the problem, but I can't find it. Can you guess the possible cause?
     
    AM-Dev likes this.
  30. AM-Dev

    AM-Dev

    Joined:
    Aug 5, 2015
    Posts:
    31
    Hi @NGC6543,
    currently I'm also working on a Unity+GVR+vuforia app. I'm also missing the Cardboard UI. And I'm having an issue with the distortion on iOS. So the left and right cameras/eyes are not correct for the cardboard.
    I've made test projects with and without vuforia. Do you experience the same issue(s)? For now it would be awesome to fix that wierd offset. So if you don't have it, please share your setup. More details are here:
    https://forum.unity3d.com/threads/u...oard-ui-missing-camera-view-stretched.461013/
    Thanks
     
  31. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    228
    AM-Dev likes this.
  32. AM-Dev

    AM-Dev

    Joined:
    Aug 5, 2015
    Posts:
    31
    Hi @NGC6543,
    thanks for your fast reply. Ok, I just noticed that I'm not going the typical GoogleVR+vuforia way. But my setup should make it easier. I have multiple scenes in the app. One is for AR and another one is for VR. There I want to use GVR, because the vuforia VR was very bad in FPS.
    So I thought I don't have to really look into that integration steps you mentioned, because it's another scene and I'm not using the vuforia ARCamera prefab in that scene.

    However, I'll make another test project with Unity 5.5.1f1, vuforia 6.2.10 and GVR 1.10 (instead of 1.30). Let's see if that'll work. I'll post an update later.
    Thanks again for the quick feedback!
     
  33. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    228
    You'd better consider the guidelines to correctly merge them. I had some issues (manifast files are messed up, etc...)

    I also Had a performance hit on VR+AR, but I circumvented it by enabling vuforia only when it is needed and changing culling masks. Now I have a constant 60fps on all occasions(iPhone6).
     
  34. AM-Dev

    AM-Dev

    Joined:
    Aug 5, 2015
    Posts:
    31
    Hey @NGC6543,
    I made some more test and still have my issues. What Unity version do you use for your project?

    Please have a look at my detailed description over at the vuforia forum:
    https://developer.vuforia.com/forum...i-missing-camera-view-stretched#comment-58312
    See screenshots:
    https://developer.vuforia.com/sites/default/files/unity-551-gvr-1.10-notes.jpg
    https://developer.vuforia.com/sites/default/files/unity-551-gvr-1.10-vuforia-6.2.10-notes.jpg

    Any idea what's going wrong?
    Thanks

    [SOLVED] Added the solution to my vuforia post:
    https://developer.vuforia.com/forum...i-missing-camera-view-stretched#comment-58315
     
    Last edited: Mar 15, 2017
  35. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    228
    I
    'll leave the reply to another thread!
     
  36. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    228
    Finally solved the issue. In fact, it was caused by the OpenCVForUnity SDK I'm using. It looks like that OpenCV switches GraphicDevice so that GVR couldn't determine the device, so it didn't draw UI layer instead.
    If someone is experiencing similar issues, search for other SDKs that might cause trouble.
     
  37. AM-Dev

    AM-Dev

    Joined:
    Aug 5, 2015
    Posts:
    31
    Hey @The_Devil,
    did you find a solution for this problem? I also need a "Main Menu" button to leave VR mode and go back to the menu. This seems to be an obvious request, but I can't find a solution in Google...
    Thanks

    EDIT: I abandoned the idea with a fullscreen canvas overlay. I found a solution here. However it doesn't work (using GVR 1.30) for me in the LateUpdate, therefore I've moved it into the update.
    Code (CSharp):
    1. void Update () {
    2.             gvrViewer.UpdateState();
    3.             if (gvrViewer.BackButtonPressed) {
    4.                 // Go back to UI Scene
    5.                 SceneManager.LoadScene("UI");
    6.             }
    7.         }
     
    Last edited: Mar 20, 2017
  38. mira_leung

    mira_leung

    Official Google Employee

    Joined:
    May 17, 2016
    Posts:
    70
    Glad you found a fix, thanks for the update!

    @AM-Dev The recommended way to leave VR mode to return to a 2D activity is to use the (X) button. In Update, check for Input.GetButtonDown(KeyCode.Escape)). Also, if you're using a native integration version of Unity, please note that GvrViewer code executes only in the editor emulator, and not on-device.
     
    AM-Dev likes this.