InputField events not passing text?

Hi there!

So I am attempting to use an inputfield UI element, and an event, to pass its changed value to a script. I get the event, but the parameter is not correct.

It seems there is a field in the event panel in the inspector that I can enter a hard coded value, which is obviously not useful. I would expect that OnValueChanged(string) or EndEdit(string) would include the value of the text field.

Am I missing something obvious?

1 Like

You have to choose your function under the “Dynamic string” section of the event to receive the input text.
If you choose your function under the Static Parameter section you can set a static value over the event inspector.

Make sure that your function or parameter is public in order to show in the function / parameter list.

15 Likes

This is so silly… Thanks