Input field text does not return the whole thing

When sample@email.com is entered into the input field, I am able to get the value “sample@email.com” from MonoDevelop.

However, when extrawordsample@email.com is entered into the input field, I am only able to get the value “wordsample@email.com”. In this case, the characters “extra” seem to be cut off when I get the input field value from MonoDevelop. It appears that any text in the text field that exceeds the visible area will be cut off.

Does anyone know how do I resolve this issue?

It seems that i should have took the text from the input field component but instead i was talking the text from the where it is displaying.

Now i am able to correctly retrieve the text.

found the answer on unity, Input Field

Hints

To obtains the text of the Input Field, use the text property on the InputField component itself, not the text property of the Text component that displays the text. The text property of the Text component may be cropped or may consist of asterisks for passwords.

1 Like