Search Unity

Text size and word wrap on GUI skins

Discussion in 'Scripting' started by Sargon_of_Akkad, Jan 16, 2013.

  1. Sargon_of_Akkad

    Sargon_of_Akkad

    Joined:
    Jan 16, 2011
    Posts:
    147
    I'm encountering a strange issue with the basic version of Unity, so I thought I'd pitch it to the community to see if it's happened to anyone else.

    On a GUI skin, changing the font size is normally no problem on labels and boxes, but if I put word wrap on, the font size reverts to the font's default size, even if I tell it to change in the editor.

    Anyone know why this is?
     
  2. dkozar

    dkozar

    Joined:
    Nov 30, 2009
    Posts:
    1,410
    I've seen icons shrink when not enough size inside the GUI element to display it. I guess it's the same with text (kinda parasitic behavior to show all the GUIContent).

    When putting the word wrap on, I guess the content gets more space for display.

    If this is true, I'd never rely to this behaviour - instead I would use explicit sizing of my fonts.