I am having a weird graphical artifact problem when entering text into InputField - large colored boxes or weird shapes that exist in the scene, but not as an object of any kind. I believe I have tracked it down to the Input Caret, but I have been unsuccessful in finding any way to disable this or remedy the issue.
Any help is appreciated! Here is the best related issue I have found (GREGERSRIDDARE’s comment)
I removed Caret by setting it with a custom color with 0 Alpha.
It worked well!
You’re 100% correct.
It’s a complete fuck-up by Unity.
It’s extremely hard to deal with those weird shapes that appear, and somtimes the Caret “stays there”.
Incredibly annoying. You have to wonder if Unity test ANYTHING.
Could not find a work around. The work around is use another game engine.
Here’s kind of a workaround…
public void PinUnlocked()
your code here;
// WAIT BEFORE REMOVING THE INPUT FIELD...
private void _removepin()
levelPin.GetComponent<InputField>().text = "";
// DO THOSE TWO THINGS
// AND DO THAT .. AND ...
private void _caremsg()
//AND WAIT, BEFORE, DOING THIS .....
your code to some other message on screen;
Hope it helps someone.
As a workaround, adding a “Canvas Group” and setting alpha value to 0 solves that issue.
Oh I remember this nasty bug. I used
inputField.caretPosition = 0 and it worked for me.