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

Trapping Value Changed & Setting Focus

Discussion in 'UGUI & TextMesh Pro' started by Lypheus, Aug 22, 2014.

  1. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    Is there a way to select an InputField via script?

    I'd like to trap TAB/ENTER key press events and set the focus to another field - how do we preview key events in the event buffer and discard them (i.e. so I can trap a TAB keypress, ignore it and set focus to the next field)?
     
  2. nventimiglia

    nventimiglia

    Joined:
    Sep 20, 2011
    Posts:
    153
    yeah I ran into this problem also.I was able to trap the tab character easy enough however I have not been able to select the next control.

    to catch the tab character I wrote a script which scan for changesand it caught the tab character ('\t') and undid it.

    I then grabbed the event system manager but the select next item method did not work as expected