Question by
muckenhoupt · Oct 14, 2020 at 11:36 PM ·
uicustom editortextfield
TextField.Focus not working completely
I'm making a custom editor using UIElements in Unity 2019.4. I have a button that, when pressed, adds some text to a certain TextField, and then calls its Focus method. The intention is that you could type some, then press the button, then keep typing, so calling Focus is necessary because obviously pressing the button takes focus away from the TextField. The result: The TextField shows some of signs of focus, such as a thicker border and a blue label. But it has no text cursor, and typing keys does not make additional text appear, as it would if I gave it focus by clicking on it. How can I give it proper focus?
Comment