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

InputField events don't have string arguments

Discussion in 'UGUI & TextMesh Pro' started by cwm83, Oct 2, 2019.

  1. cwm83

    cwm83

    Joined:
    Jun 15, 2018
    Posts:
    1
    The On Value Change() and On End Edit() events on my InputField component do not have string parameters (see attached image for a screenshot).

    In the the docs for 2019.2, the events are shown in the editor as On Value Changed(string) and On End Edit(string) https://docs.unity3d.com/2019.2/Documentation/Manual/script-InputField.html

    When I add a listener in the editor and select a function from the dropdown, I do not get any Dynamic Parameter functions, presumably since the event doesn't send any parameters. But this means I can't send the input field text to a function by default. I can of course write my own script to get the text value and send it, so this isn't a show stopper by any means, but it just seems wrong...

    Am I missing something here?
     

    Attached Files:

  2. hhthunderbird

    hhthunderbird

    Joined:
    May 23, 2014
    Posts:
    6
    Happened to me on 2018.4.9, tried to upgrade to 2019.2.X and then to 2019.3.X and no solution.

    Also I noticed that the EventTrigger function signature doesn't show the need of a BaseEventData, so all the references on the editor was showing 'missing' references, and as I removed the parameters, everything worked fine, but I was not needing the parameters anyway.
     
    Last edited: Oct 2, 2019
  3. hhthunderbird

    hhthunderbird

    Joined:
    May 23, 2014
    Posts:
    6
  4. nbkhanhdhgd

    nbkhanhdhgd

    Joined:
    Apr 19, 2016
    Posts:
    23
    Hi @hhthunderbird
    Thank you for your solution. I followed your solution but it not work for me => missing event.
    Hi @cwm83 Did you resolve problem?