Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Build issue with button and I don't know why.

Discussion in 'VR' started by hiab-x, Dec 4, 2021.

  1. hiab-x

    hiab-x

    Joined:
    Apr 14, 2013
    Posts:
    34
    Hi, I've got an almost complete project. There's only one UI element in the form of a Start button on the home screen. Yesterday, I downloaded Gaze UI from the asset store and got it working with no problems for my Start button during play test in Unity editor. Assuming that the start button issue was resolved, I paid it no further attention.

    In the editor play mode, looking at start gets a reticle to light up as expected, hold the gaze long enough and the next scene is triggered.

    In build, the gaze reticle is just a dot, the activation graphic reticle fails to appear, and needless to say, the damn thing doesn't start.

    I've looked for answers and not seen anything that seems to give a meaningful solution (unless looking at forum posts from 2017 and people talking about Java script solutions applies) My build is in Unity 2020.3, so I'd be very keen to hear some current advice. (Yes, already mailed the guy who wrote the add-on) Project deadline was 14:00 today and I missed it.
     
  2. NemesisWarlock

    NemesisWarlock

    Joined:
    Jan 21, 2017
    Posts:
    140
    The Gaze UI asset (if you're talking about this one: https://assetstore.unity.com/packages/tools/gui/gaze-ui-for-canvas-70881#releases ) is not built for VR, it's built for screen space raycasts on pancake screens. (EDIT: Upon further inspection, it does have rudinemtary support, but uses deprecated API calls for old hardware no longer in common use.)

    Depending on your VR SDK and target hardware, your SDK's demo directory should have an example of how to perform Gaze-tracked Raycasts in (world space) VR. Which SDK are you using? Oculus? VR Interaction Toolkit?
     
  3. hiab-x

    hiab-x

    Joined:
    Apr 14, 2013
    Posts:
    34
    Hi, thanks for responding. I was using the XR Interaction framework on my project, Unity 2020.3. In VR, the add-on worked absolutely flawlessly, so I had no reason to doubt that It wouldn't perform during the final build. I've since removed it and implemented a simple one controller, point and click solution. It's a shame though, the other method was far more elegant.