Search Unity

Scroll Rect not working with a gamepad.

Discussion in 'UGUI & TextMesh Pro' started by Epictickle, Sep 7, 2015.

  1. Epictickle

    Epictickle

    Joined:
    Aug 12, 2012
    Posts:
    431
    I'm trying to build my ui to be compatible with a gamepad, but I've hit a snag when trying to navigate through my scrollrect which is filled with dynamic content (an inventory menu, to be exact). I've got my scrollrect filling up with the content just fine, when my inventory screen starts it selects the first item in my inventory, and from there I can use my gamepad to navigate through the UI. My problem, though, is when I navigate past the mask on my scrollrect, it doesn't actually scroll it down to where I can see the item selected. Is there a way I can do this with Unity UI in the editor, or do I need a scripting workaround? If so, where should I begin? lol
     
  2. Epictickle

    Epictickle

    Joined:
    Aug 12, 2012
    Posts:
    431
    Bump. Does nobody know How to go about doing this?
     
  3. florianbepunkt

    florianbepunkt

    Joined:
    Nov 28, 2015
    Posts:
    45
    Has anyone found a solution to this? I have the exact same problem.

    I have a scroll rect and an inventory with a grid layout component inside it.

    Thanks,
    Florian
     
  4. DWilliams

    DWilliams

    Joined:
    Jan 12, 2015
    Posts:
    63
    I think you would need to add a script to each element in the scrollrect so that when it's selected, it checks if it's near enough to the bottom or top that you would need to scroll then manually scroll it by a certain amount.