3

I am trying to move a project from Google cardboard SDK to Daydream SDK. I am using latest GVR SDK. In my scene, a canvas has few buttons which changes active colour on hover. It was working fine with Cardboard reticle, but when I am using Daydream controller, it is sometimes able to interact with buttons. Rest of the time it just acts as if the button was not there and no action is taken when hover on it. I want to add a point that the same controller is working fine with objects click interaction in the same app.

The issue arises with buttons in canvas. I have tried using different types of Renderer and collider components on the button.

Nimantha
  • 6,405
  • 6
  • 28
  • 69
sns
  • 221
  • 4
  • 17

2 Answers2

1

The "User Interaction" section on the page https://developers.google.com/vr/unity/guide explains how to setup event systems in the latest GVR Unity SDK.

My best guess is that you need to switch GraphicRaycaster to GvrPointerGraphicRaycaster, since those were only added to the SDK after Daydream support was added. However, I can't say for sure without more information about how your scene is setup. Do you see any warnings or errors in the logs?

Also, the latest GVR Unity SDK has an example scene called ScrollingUIDemo that includes interaction with buttons on canvases. Looking at that scene may help you determine what is different.

I hope that helps! If you provide more information about how your scene is constructed I can try to help further.

Dsternfeld
  • 166
  • 3
  • when i am using a canvas and a single button in canvas the controller is always pointed to the button itself..its not changing – Martin j May 04 '17 at 06:41
  • If you are using Unity 5.6 in the editor, make sure the Game window is the focused window. Otherwise, the Input Module doesn't get updated which can cause this behavior. Do you see the laser and controller move as you move the physical controller? – Dsternfeld May 24 '17 at 23:48
0

See https://forum.unity.com/threads/problem-with-setting-up-gvrcontrollerpointer.460285/ The standard raycaster in the canvas has to be replaced with the GVR raycaster.

JuanT
  • 69
  • 6