Search Unity

TextMesh Pro Interpret special character as word?

Discussion in 'UGUI & TextMesh Pro' started by rvirmoors, Feb 19, 2021.

  1. rvirmoors

    rvirmoors

    Joined:
    Oct 13, 2020
    Posts:
    1
    Say I have a string such as "I like to _"

    I would like for the
    _
    character/word to be interactable, but it's not interpreted as a word.

    Now, I have used
    TMP_TextUtilities.FindIntersectingCharacter
    instead, and that works. But the underscore character itself is super thin, and hard to get at with the mouse. This doesn't seem to be an issue for TMP words, which get a nice big bounding box.

    A workaround for this I've found to be using a special character such as 〿, which is easier to click as a Character. But still, it's not ideal, looks pretty bad.

    Is there a way to make TMP interpret
    _
    as a word? Or another way to make its mesh box bigger & easier to click on?