How can I disable the InputField Input Caret in Unity 5?

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)

Thanks!

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;
	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;
	}

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.