Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

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,045
    I think you can use onValidateInput to do this already.
     
  3. nventimiglia

    nventimiglia

    Joined:
    Sep 20, 2011
    Posts:
    153
    > onValidateInput

    Ok thanks,