Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    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,028
    I think you can use onValidateInput to do this already.
     
  3. nventimiglia

    nventimiglia

    Joined:
    Sep 20, 2011
    Posts:
    153
    > onValidateInput

    Ok thanks,
     
unityunity