Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

[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

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    6,588
    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.