Reputation: 653
I'm working on a Unity3D game and after updating to version 5.4 I noticed that multi-line InputField is behaving strangely. It stopped scrolling the text correctly. When text is longer than it's possible to show in the input area, and you keep typing, it doesn't scroll down like it used to. You can type, and until you go to another line, the text is invisible. When you go to the next line, the line you have finished appears, but the "new last line" is hidden.
Any idea how to go around this problem other than forcing empty \n at the end of the text?
Here are the details of the input field I work with (though I've replicated the problem with brand new InputField created using editor):
Content type: Standard
Line type: Multi Line Newline
Character limit: 0 (increasing it to 1000 doesn't change anything)
Associated text parameters:
Horizontal overflow: wrap
Vertical overflow: truncate
Edit: Apparently it's not a problem with focus on the correct line of the text after new line is reached, but rather input field not knowing when to display the line below. Moving cursor up and down the text also causes this problem.
Edit2: I tried launching ForceLabelUpdate and Rebuild onValueChanged, however the problem remains.
Upvotes: 4
Views: 1222
Reputation: 653
So the answer is to drop the abysmal built in Unity InputField and replace it with TextMesh Pro: https://www.assetstore.unity3d.com/en/#!/content/17662
Latest version has support for InputField and it's not based on UnityUI, like other plugins available on the store, also affected by this bug.
Upvotes: 1