Author Topic: Disabling gamepad input scrolling for a particular UIScrollview.  (Read 5087 times)

sfj

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 14
    • View Profile
Hi,
 I got a problem on Apple TV where I have a level selection map, I have changed the navigation to use "center on child" and my own code instead of "scrolling" and this works fine on iOS and in the editor.

Although when I deploy to apple TV the scrollview also starts scrolling normally even though no scrollbars are hooked up, I guess this comes from the input events...if that is the case...then I would need to disable these for this particular scroll view, is this possible?

Any ideas what is happening, how to work around this?

Cheers,


Stefan

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Disabling gamepad input scrolling for a particular UIScrollview.
« Reply #1 on: July 01, 2016, 11:27:33 PM »
How is apple TV controlled? Is there a joystick controller? UICamera has "pan" axes you get to specify that make it possible to scroll scrollviews using a controller. You can disable it by commenting out the OnPan function in UIDragScrollView or by simply clearing the pan axes specified on the UICamera.

Another way is to use the mouse scroll wheel. It works as long as there is a UIDragScrollView script attached to the currently selected object. You can disable that by commenting out UIDragScrollView's OnScroll function, or by simply clearing the scroll axis on the UICamera.

sfj

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 14
    • View Profile
Re: Disabling gamepad input scrolling for a particular UIScrollview.
« Reply #2 on: July 03, 2016, 06:26:29 AM »
The apple TV has a remote and gamepads. The remote itself has apparently been wired to work both as a controller and a touch device, that is that why it got a little funny.

I did have a look at  modifying the scroll view, or UIDragScrollView script as you suggested and that would work. The solution I picked for now, as it seems be least intrusive, was to create a little script where I can declare platform dependent UICamera input settings. This allows me to just have one GUI that works on all platforms.