Search Unity

Input Field, how to access the interception events?

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

  1. Tiles

    Tiles

    Joined:
    Feb 5, 2010
    Posts:
    2,481
    When i attach an Event Trigger script to a Input Field then i get several Intercepted methods. I can access them by adding a new Event trigger. Unfortunately those events are not what i need for my Input Field. I need a method that fires when i hit enter or click somewhere else to submit my written text. OnSubmit sounds what i need here.

    But i cannot add an Event Trigger for the Input Field. How do i access the Input Field interception events?
     

    Attached Files:

  2. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    Hi, we will be exposing this in the next version.
     
    Tiles likes this.
  3. Tiles

    Tiles

    Joined:
    Feb 5, 2010
    Posts:
    2,481
    No wonder i cannot find it :D

    Thanks Tim C. Then i will wait for the next version. I hope it arrives soon :)
     
  4. Tiles

    Tiles

    Joined:
    Feb 5, 2010
    Posts:
    2,481
    Wasn't in Beta Build 18 :(

    I still search for a way to catch entered text. And somebody told me a coding way to catch the onSubmit by an AddListener and a corresponding function. But this one just catches pressing enter. Not when i click with the mouse outside of the edit box. Is this intended? Or does something missing here since clicking outside of the edit box also submits changes to the text in the Input Field.

    While at it, i can catch onSubmit that way. But not the other stuff. How do i catch OnPointerExit for example? I can do this one by code:

    Code (csharp):
    1.  
    2. var myeditbox: InputField;
    3. ...
    4.   if (myeditbox.OnPointerDown){
    5.      haschanged=true;
    6.    }
    But it gives me always true.
     
  5. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    Looks like it missed the cuttoff :( I'll ping the guy working on text.
     
  6. Tiles

    Tiles

    Joined:
    Feb 5, 2010
    Posts:
    2,481
    Thanks Tim C :)
     
  7. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    Any updates on how to access "Intercepted Events"?
    API?
    Docs?