Search Unity

TextMesh Pro nobr isn't working as I would expect

Discussion in 'UGUI & TextMesh Pro' started by AcademyOfFetishes, Mar 5, 2019.

  1. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    219
    I have nobr wrapped around each little checkbox/phrase combination in a field, but I'm still getting line breaks in the middle of the field. See the image below:



    Since I have nobr's wrapped around every checkbox/phrase piece, I don't think the "Place in Trough" at the upper right should be broken on word wrap, but as you can see, it says "Place in Tro" on one line and "ugh" at the beginning of the next. Here's the text I'm using:

    Code (csharp):
    1. <nobr><sprite="descriptionicons" name="unknown" color="#FFFFFF" tint=1> Fill Bucket<space=5em></nobr><nobr><sprite="descriptionicons" name="unknown" color="#FFFFFF" tint=1> Fill Bucket<space=5em></nobr><nobr><sprite="descriptionicons" name="unknown" color="#FFFFFF" tint=1> Place in Trough<space=5em></nobr><nobr><sprite="descriptionicons" name="unknown" color="#FFFFFF" tint=1> Place in Trough<space=5em></nobr><nobr><sprite="descriptionicons" name="unknown" color="#FFFFFF" tint=1> Fill Bucket<space=5em></nobr><nobr><sprite="descriptionicons" name="unknown" color="#FFFFFF" tint=1> Fill Bucket<space=5em></nobr><nobr><sprite="descriptionicons" name="unknown" color="#FFFFFF" tint=1> Place in Trough<space=5em></nobr><nobr><sprite="descriptionicons" name="unknown" color="#FFFFFF" tint=1> Place in Trough<space=5em></nobr><nobr><sprite="descriptionicons" name="unknown" color="#FFFFFF" tint=1> Fill Bucket<space=5em></nobr><nobr><sprite="descriptionicons" name="unknown" color="#FFFFFF" tint=1> Fill Bucket<space=5em></nobr><nobr><sprite="descriptionicons" name="unknown" color="#FFFFFF" tint=1> Place in Trough<space=5em></nobr><nobr><sprite="descriptionicons" name="unknown" color="#FFFFFF" tint=1> Place in Trough<space=5em></nobr><nobr><color=#FFFFFF><sprite="descriptionicons" name="unknown" color="#FFFFFF" tint=1>Done</nobr>
    Am I doing something wrong?

    Here are more settings for my text field:

     
  2. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    219
    OK I figured this one out, too. The solution is to put a space after the closing nobr tag, or else it doesn't work.
     
    jamesf42 and RaL like this.