Search Unity

How to move focus of Toggle's Navigation?

Discussion in 'Scripting' started by leegod, Oct 30, 2020.

  1. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,476
    Code (CSharp):
    1. public void EquipInvenChanged(Toggle tog)
    2.     {          
    3.         if (tog.isOn)
    4.         { EventSystem.current.SetSelectedGameObject(tog.gameObject);
    5.          }
    6.      }
    7.  
    But I call above function by click some toggle, keyboard's direction key does not react.

    Why and how to make it work?

    I already set many toggle's navigation as explicit and set reference each others.
     
  2. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,476
    I solved.