Search Unity

  1. Click here to receive a gift with your purchase of Unity Pro or Unity Enterprise.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

TextMesh Pro TMPro: Caret randomly disappearing (always shows in editor; not game)

Discussion in 'UGUI & TextMesh Pro' started by MrLucid72, Feb 25, 2020.

  1. MrLucid72


    Jan 12, 2016
    If I have a TMP_Input, sometimes it will show the caret and sometimes it will not. Within the editor, it always shows it. While playing, each new character MAY "reset" the caret to show, but not always. See below for missing caret in player, but not editor:


    This is easier seen as a GIF. Note the inconsistency: Even repeating "t" will sometimes show caret, and sometimes hide. This confuses end-users, as it looks like they accidentally unfocused the input:

    # Settings


    Attached Files:

  2. Antistone


    Feb 22, 2014
    Hypothesis: the caret is less than 1 pixel wide, and the width gets "rounded" differently depending on where "within" the pixel the caret happens to fall. (Another poster on this forum recently had this problem with strikethrough.)

    On the input field settings, try increasing the caret width and see if that affects the behavior.
    MaxPfeil likes this.