Custom VRInputModule and VRGraphicsRaycaster problems in built

Hi,

I have a custom VRInputModule and VRGraphicsRaycaster, which I use to get Unity UI working with SteamVR.
It works perfectly fine in the Editor. And it has previously (in 2018) worked perfectly fine in the build.

Now, all of a sudden (in 2019), in the built it behaves completely randomly. Sometimes the raycaster hits the UI, sometimes it doesn’t. When I teleport around the scene, the behaviour changes. It’s like there is a problem with the raycast.

Did something change in the UI system between 2018 and 2019?

I have a hard time finding the cause for this. I can’t share the code. I get the controller position, perform a raycast using the EventSystem, and when the raycaster is a VRGraphicRaycaster on a World Space canvas, I show a laser pointer.

And as said, it works perfectly in the Editor. But when I create a build, it doesn’t work.

Found the error. None of the Canvases had the VR Camera as EventCamera. In Editor this works without errors, but in the built it only works when you assign a camera in Canvas.EventCamera

1 Like