Log in or register to post comments

Unity 5.4.0b15 and Vuforia 5.5.9

April 28, 2016 - 2:45pm #1

Hey there,

I'm trying to get https://developer.vuforia.com/library/articles/Solution/Integrating-Gear-VR-and-the-AR-VR-Sample-in-Unity-5-3-and-above this to work on GearVR and I've had no luck. I'm getting a black screen when I put my device into my gear. What should I be seeing?

Cheers,

Paul

Unity 5.4.0b15 and Vuforia 5.5.9

May 2, 2016 - 7:10am #10

Using Unity 5.3.2 you should get it working without any issue, by following the step-by-step guide documented here:

https://developer.vuforia.com/library/articles/Solution/Integrating-Gear-VR-and-the-AR-VR-Sample-in-Unity-5-3-and-above

 

If it still does not work, make sure that:

  • you have added a valid O-sig file for your device (this needs to be added to the Plugins/Android/assets folder)
  • you have specified a valid Mobile Vuforia License (do NOT use Digital Eyewear license keys, use a Mobile License key for GearVR)
  • double-check the Player Settings (make sure OpenGL ES 2.0 is selected)
  • double-check once again all the steps of the Doc above

 

Unity 5.4.0b15 and Vuforia 5.5.9

May 2, 2016 - 6:29am #9

No news from you guys. Any suggestions?

Unity 5.4.0b15 and Vuforia 5.5.9

April 29, 2016 - 11:32am #8

So I've tried 5.3.2f1 and I've had no luck. I'm not even getting the Unity Splash screen. When I take the phone out of the GearVR the application crashes. Any ideas?

Cheers,

Paul

Unity 5.4.0b15 and Vuforia 5.5.9

April 29, 2016 - 7:19am #7

You should :

- use Vuforia 5.5.9

- use Unity 5.3.x

- make sure that the "targetSdkVersion" in your AndroidManifest.xml is set to a value less than "23" (e.g. "19" through "22" are values you can safely use for GearVR); the AndroidManifest.xml in question is the one located under 'Assets/Plugins/Android' in your Project folder

if the workaround mentioned previously does not work, I would suggest making a first test with Unity 5.3.1 or 5.3.2, by following the official integration guide (the Library Article you already mentioned);

  • if that works, you can then try with 5.3.4 or 5.4.0 beta (although, 5.4.0 beta is not officially supported yet by Vuforia, as it is still a "beta" version).\
  • if that does not work, it means you need to double-check your steps following the Library article

 

Additional tip: 

make sure that you have set your Graphics API to OpenGL ES 2.0 (as OpenGL ES 3.0 is not yet supported).

 

 

Unity 5.4.0b15 and Vuforia 5.5.9

April 29, 2016 - 6:02am #6

Here's what my hierarchy looks like.

What minimum SDK should I be targetting? What SDK should I be building against? Does that even matter?

Unity 5.4.0b15 and Vuforia 5.5.9

April 29, 2016 - 5:58am #5

Already brought in the mentioned fix to no avail.

Unity 5.4.0b15 and Vuforia 5.5.9

April 29, 2016 - 5:31am #4

This is a known issue occurring starting with Unity 5.3.4, already discussed here:

https://developer.vuforia.com/forum/unity-extension-technical-discussion/gearvr-passthrough-camera-not-working-arvr-sample

In particular, for the fix, see comment  #18 in the thread above.

 

Unity 5.4.0b15 and Vuforia 5.5.9

April 29, 2016 - 5:28am #3

There is a known issue with GearVR Vuforia integration on Unity 5.3.4 and above (this also included Unity 5.4.0 beta, at present);

 

the issue has already been discussed here:

https://developer.vuforia.com/forum/unity-extension-technical-discussion/gearvr-passthrough-camera-not-working-arvr-sample

 

There is a simple workaround for that: 

- open the VRIntegrationHelper.cs script, located in Assets/Vuforia/Scripts/Utilities

- replace the code in void OnPreRender() with the following code:

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
void OnPreRender()
    {
        // on pre render is where projection matrix and pixel rect are set up correctly (for each camera individually)
        // so we use this to acquire this data.
        if (IsLeft && !mLeftCameraDataAcquired)
        {
            mLeftCameraMatrixOriginal = mLeftCamera.projectionMatrix;
 
            if (
                !float.IsNaN(mLeftCamera.projectionMatrix[0,0]) && !float.IsNaN(mLeftCamera.projectionMatrix[0,1]) &&
                !float.IsNaN(mLeftCamera.projectionMatrix[0,2]) && !float.IsNaN(mLeftCamera.projectionMatrix[0,3]) &&
                !float.IsNaN(mLeftCamera.projectionMatrix[1,0]) && !float.IsNaN(mLeftCamera.projectionMatrix[1,1]) &&
                !float.IsNaN(mLeftCamera.projectionMatrix[1,2]) && !float.IsNaN(mLeftCamera.projectionMatrix[1,3]) &&
                !float.IsNaN(mLeftCamera.projectionMatrix[2,0]) && !float.IsNaN(mLeftCamera.projectionMatrix[2,1]) &&
                !float.IsNaN(mLeftCamera.projectionMatrix[2,2]) && !float.IsNaN(mLeftCamera.projectionMatrix[2,3]) &&
                !float.IsNaN(mLeftCamera.projectionMatrix[3,0]) && !float.IsNaN(mLeftCamera.projectionMatrix[3,1]) &&
                !float.IsNaN(mLeftCamera.projectionMatrix[3,2]) && !float.IsNaN(mLeftCamera.projectionMatrix[3,3])
                )
            {
                mLeftCameraPixelRect = mLeftCamera.pixelRect;
                mLeftCameraDataAcquired = true;
            }
        }
        else if (!mRightCameraDataAcquired)
        {
            if (
                !float.IsNaN(mRightCamera.projectionMatrix[0, 0]) && !float.IsNaN(mRightCamera.projectionMatrix[0, 1]) &&
                !float.IsNaN(mRightCamera.projectionMatrix[0, 2]) && !float.IsNaN(mRightCamera.projectionMatrix[0, 3]) &&
                !float.IsNaN(mRightCamera.projectionMatrix[1, 0]) && !float.IsNaN(mRightCamera.projectionMatrix[1, 1]) &&
                !float.IsNaN(mRightCamera.projectionMatrix[1, 2]) && !float.IsNaN(mRightCamera.projectionMatrix[1, 3]) &&
                !float.IsNaN(mRightCamera.projectionMatrix[2, 0]) && !float.IsNaN(mRightCamera.projectionMatrix[2, 1]) &&
                !float.IsNaN(mRightCamera.projectionMatrix[2, 2]) && !float.IsNaN(mRightCamera.projectionMatrix[2, 3]) &&
                !float.IsNaN(mRightCamera.projectionMatrix[3, 0]) && !float.IsNaN(mRightCamera.projectionMatrix[3, 1]) &&
                !float.IsNaN(mRightCamera.projectionMatrix[3, 2]) && !float.IsNaN(mRightCamera.projectionMatrix[3, 3])
                )
            {
                mRightCameraMatrixOriginal = mRightCamera.projectionMatrix;
                mRightCameraPixelRect = mRightCamera.pixelRect;
                mRightCameraDataAcquired = true;
            }
 
        }
    }

 

Unity 5.4.0b15 and Vuforia 5.5.9

April 28, 2016 - 2:50pm #2

I can't get the examples to run on 5.3.4f1 either :(

Log in or register to post comments