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)
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;
Invoke("_removepin", .1f);
// WAIT BEFORE REMOVING THE INPUT FIELD...
}
private void _removepin()
{
levelPin.GetComponent<InputField>().text = "";
UnityEngine.EventSystems.EventSystem.
current.SetSelectedGameObject(null);
// DO THOSE TWO THINGS
levelPin.SetActive(false);
// AND DO THAT .. AND ...
Invoke("_caremsg", .1f);.
}
private void _caremsg()
{
//AND WAIT, BEFORE, DOING THIS .....
your code to some other message on screen;
}