Search Unity

How to implement ScrollRect in daydeam?

Discussion in 'Daydream' started by Futurristic, Dec 29, 2016.

  1. Futurristic

    Futurristic

    Joined:
    Jun 21, 2016
    Posts:
    47
    Hi, I am making a DayDream application in which i have a horizontal panel of buttons which i want to drag and scroll with daydream controller. How should i implement this....?
     
  2. dsternfeld

    dsternfeld

    Official Google Employee

    Joined:
    Jan 3, 2017
    Posts:
    72
    Hi Futurristic!

    Check out the demo scene ScrollingUIDemo that is packaged within the SDK. This implementation uses the touchpad to scroll instead of clicking and dragging, which is the recommended UX for scrolling with a daydream controller. The scene is also an example of how to use the daydream controller with Unity's UI system.

    Unfortunately, Unity's ScrollRect component doesn't currently work with the SDK out of the box. This is because GvrPointerInputModule doesn't fully implement IDragHandler and the GvrPointer raycaster's don't fully implement ScreenPosition in the RaycastResult. This will be fixed in the next release of the SDK, if you can't wait for that you can look into implementing it in GvrPointerInputModule yourself.

    I hope that helps!
     
  3. Futurristic

    Futurristic

    Joined:
    Jun 21, 2016
    Posts:
    47
    thanks it does help. I really appreciate.