Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

VR app stopped working on Gear VR after upgrading to 5.4 beta.

Discussion in '5.4 Beta' started by Imbazephyr, Jun 15, 2016.

  1. Imbazephyr

    Imbazephyr

    Joined:
    Jul 2, 2015
    Posts:
    8
    Hello guys!!
    I'm quite new to the forum community, please excuse me if I have posted in the wrong forum.
    I ran into this weird issue quite a few days ago. Originally I upgraded to Unity 5.4 to resolve the weird issue about Unity tree generator that was in Unity 5.3 (the one that starts with "GetLocalizedString ..."). It did resolve the bug, but it gave me a new issue.
    Currently everything runs fine in the editor, but when I do a android build and deploy that on Gear, all the pointer events (i.e OnPointerEnter and OnPointerExit) would stop working.
    Strange thing is that I also did a standalone build by disable VR support in player setting, and everything worked fine as well.
    If you guys have any suggestions, feel free to share with me. Thank you guys.
     
  2. williamj

    williamj

    Unity Technologies

    Joined:
    May 26, 2015
    Posts:
    94
    Hi,

    I am unable to reproduce the problem. But I could use some more details. If you have time, please submit a bug report with a small project the demonstrates the issue then post the bug report number here. I can definitely dig into the problem then.

    Also, I think I am confused. How are you using OnPointerEnter/OnPointerExit in a GearVR app? Have you extended it to work for a gaze based UI?

    Thanks,

    Will
     
  3. Imbazephyr

    Imbazephyr

    Joined:
    Jul 2, 2015
    Posts:
    8
    Hi Will:
    Thanks for the reply:
    I will try to elaborate on my problem a bit:
    I'm using a custom gaze pointer script (the one from Tales of the Rift). It uses the pointer event data class provided by Unity: So basically to my understanding I'm trying to use a new format of input for the event system (please correct me if I'm wrong), and it was working perfectly back in Unity 5.34.

    I will attach the link here: http://talesfromtherift.com/vr-gaze-input/
    It comes with an example scene. Please try to build it and run it in Gear VR, maybe then compare that with a standalone android build (with standard input enabled instead).

    PS: I will also look into submitting a bug report: I was still trying to isolate the problem but now I think I'm confident to ask you guys to take a look.
     
  4. williamj

    williamj

    Unity Technologies

    Joined:
    May 26, 2015
    Posts:
    94
    Hi,

    This is actually expected behavior, the Tales from the Rift tutorial seems to be a bit out of date. The line:


    Code (CSharp):
    1. // fake a pointer always being at the center of the screen
    2. pointerEventData.position = new Vector2(Screen.width/2, Screen.height/2);
    in 5.4 should really be:

    Code (CSharp):
    1. // fake a pointer always being at the center of the screen
    2. pointerEventData.position = new Vector2(UnityEngine.VR.VRSettings.eyeTextureWidth/2, UnityEngine.VR.VRSettings.eyeTextureHeight / 2);
    Either way, I suggest using this blog as a resource for gaze UI.

    It's a little more robust and can be modified to work with GearVR, Oculus and Vive.
     
  5. Imbazephyr

    Imbazephyr

    Joined:
    Jul 2, 2015
    Posts:
    8
    Ok, I have tried the sample scene in that blog post and it works with Gear VR.
    Trying to integrate that into my project right now.
    Thanks Will, you really helped me out.