Search Unity

Question Any way to prevent line breaking between an image and the next word?

Discussion in 'UGUI & TextMesh Pro' started by juicybeast, Feb 15, 2021.

  1. juicybeast

    juicybeast

    Joined:
    Nov 12, 2014
    Posts:
    32
    Sorry if this is a basic functionality or reoccurring question but I couldn't find any resource or question on that, pretty sure it's because I can't find the right key words...

    Anyways, yeah... Any way to prevent line breaking between an image and the next word? Alternatively, any way to group words so they always stay on the same line? Maybe like: "<nobreak> </nobreak>" or something similar? Because when my character says: "you need 80<strawberry image>" it looks silly when the line breaks right after the 80.
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    You were close. <nobr> and </nobr>
     
  3. juicybeast

    juicybeast

    Joined:
    Nov 12, 2014
    Posts:
    32
    Haha thanks! Sorry again for my lack of basic research skills.