[RC1] InputField - a bug?

A little prelude:
When I set the default value of an InputField through GetComponent.textComponent.text, the value clears automatically when I click on the inputField in game. I need it to remain there, so…

The workaround to it was to instead set GetComponent.value in previous beta versions, however you guys changed “.value” to “.text” recently.

And now the bug:
When I set GetComponent.text, the value is set just fine (I can see it in the inspector), however in game it appears invisible. One way to make it visible is to setActive(false) and then setActive(true) the inputfield. Another one is to double click it to put a caret in there and then hit “ctrl+end”.

Here’s a video demonstrating the issue:

1 Like

If you call InputField.MoveTextEnd(bool) (Unity - Scripting API: UI.InputField.MoveTextEnd) after setting the text, it should reappear! At least it worked for me :slight_smile:

1 Like

yes this is a known bug that we’ve done a fix for RC2.

1 Like