Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Are there no built-in keyboard (or controller) support for moving component in UI?

Discussion in 'Scripting' started by leegod, Sep 25, 2023.

  1. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,335
    I made scrollrect and add gridlayoutgroup.

    And many childrens inside above group positioned rectangle.

    Now, most want here keyboard (or controller) up/down/left/right move through children elements.

    But there is no built in function for this?

    I should make code everytime from scratch?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,711
    Do you mean UnityEngine.UI's built-in Navigation mechanism?

    Unfortunately Unity seems to have wrecked / removed their old UnityEngine.UI documentation and replaced it with the new incomplete stuff, which does not appear to mention navigation anywhere that I can find.

    If you google for
    unityengine ui navigation
    you can find some interesting bits still held on by Google.
     
  3. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,335
    yes thx for remind the word, Navigation,

    So now, it can't be using?
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,711
    I didn't write that. It's all in there. I just cannot find the Unity official documentation anymore, but parts of it can be dug up via Googling the above links. I have no idea what parts you need to know, so that's why I suggest googling.
     
  5. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,335
    googled but default input actions does not generated with premade settings, package already installed.

    so when make input action, it comes with total blank. Most googled result comes with default settings I remember this was I got in few years ago unity version.
     
  6. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,335
    still unity there is so many void holes for just this basic element. I should make whole wheel reinvention again and again from scratch for most cases needed for just very simple game.
     
  7. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    5,844
    You don't need to reinvent this stuff. It's right there built in.

    Only Selectable UI elements support built in navigation, such as buttons. So long as one is selected, then navigation events will work based on your settings.

    Also need to ensure there's an event system present as well.