Can the InputField text caret be changed / animated? I'd really like to turn it into a feather quill with a bit of rotation noise around the tip when typing.
Currently no it cant be changed. Your have to duplicate the input field and change the GenerateCursor functionality.
Uhmm... The inputField does create a child RectTransform for the caret. I capture this to get around a bug that occurs when the pivot of the inputfield is changed http://issuetracker.unity3d.com/iss...ter-caret-is-misaligned-when-pivot-is-altered. Like this Code (CSharp): using UnityEngine; using UnityEngine.UI; using UnityEngine.EventSystems; using System.Collections; public class FixInputFieldCaret : MonoBehaviour, ISelectHandler { public void OnSelect(BaseEventData eventData) { InputField ipFld = gameObject.GetComponent<InputField>(); if(ipFld != null) { RectTransform textTransform = (RectTransform)ipFld.text.transform; RectTransform caretTransform = (RectTransform)transform.Find(gameObject.name+" Input Caret"); if(caretTransform != null && textTransform != null) { caretTransform.localPosition = textTransform.localPosition; } } } } Would't it be possible to change this code and add an Image component to the gameobject I found for the Input Caret?
Funny. I reported that bug, so it looks like I got something out of this thread after all. Thanks @Orbcreation ! I tried adding an Image to the caret GO as postulated, and it did appear, but the Image became invisible on further input. Tweaking the Image in the inspector in any way makes it visible again. So does switching to a different app and back to Unity. I've experimented with several ways to trigger this in a script, but can't seem to do it. Neither Graphic.SetAllDirty() nor Graphic.Rebuild() produce the same effect. But it feels like there might be a workaround here. Of course, it would be great to have this officially supported.