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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

InputText.onValueChanged

Discussion in 'UGUI & TextMesh Pro' started by nventimiglia, Aug 21, 2014.

  1. nventimiglia

    nventimiglia

    Joined:
    Sep 20, 2011
    Posts:
    153
    Hi, I am writing a databinding library and I would like to add delegates to the the "InputText.onValueChanged" delegate list if there is one. Right now there is only a "InputText.onSubmit" delegate list. This is fine for some use cases, but, not all.

    I can make due with using Update to poll the text for now, but, I would prefer to have an event I could wire into, ie:


    Target = GetComponent<InputField>();
    Target.onValueChanged(MyHandlerMethod);
     
  2. deram_scholzara

    deram_scholzara

    Joined:
    Aug 26, 2005
    Posts:
    1,043
    I think you can use onValidateInput to do this already.
     
  3. nventimiglia

    nventimiglia

    Joined:
    Sep 20, 2011
    Posts:
    153
    > onValidateInput

    Ok thanks,