- Home /
UI InputField text sometimes invisible?
Sometimes when I change the text in an InputField in the UI, the text goes completely invisible? Any idea why this might be occurring? The text is set to "Best Fit" and can shrink down to 10 point (it normally floats around 140pt so it'd have to be a LOT of W's before it got that small).
It mostly happens if I change the text all at once, through code, rather than typing it in myself.
If "It mostly happens if I change the text all at once, through code, rather than typing it in myself.", please, copy-paste the code where you change the content of your input field.
It's literally just
CustomizationPetName.text = _petNameUpdate;
Where _petNameUpdate gets pulled from a list of a few hundred random names. I THIN$$anonymous$$ it's something to do with the "Best Fit" rendering, so I've disabled that. Not sure if that's fixed it, testing it now.
I also had this glitch, maybe try to use
Canvas.ForceUpdateCanvases ();
after you do you operation.
Answer by lumizila · May 02, 2016 at 02:37 AM
I have never had this problem but I would suggest using a text field if you are going to add text through a script. In general, I noticed text fields tend to have less bugs.
Your answer
Follow this Question
Related Questions
Prevent focus from leaving inputfield 0 Answers
Inputfield text to String variable 1 Answer
How can I block Copy Paste from Input Field? 3 Answers
Display user Input to a text UI element. 0 Answers