Search Unity

[Textmesh Pro] I want to avoid line breaking in words with hyphens.

Discussion in 'UGUI & TextMesh Pro' started by chemariz, Jul 18, 2019.

  1. chemariz

    chemariz

    Joined:
    Feb 19, 2018
    Posts:
    5
    I am using Textmesh pro in Unity, and word wrapping is breaking the word WI-FI in two lines, like this:

    WI-
    FI

    How force Textmesh pro to treat it like a single word, so it wont be split in two lines?
     
    MoveMobile2 likes this.
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Use a non-breaking hyphen which is Unicode \u2011.

    The normal hyphen is defined as a line breaking characters whereas the non-breaking hyphen is not.
     
    viesc123 likes this.