All GUI text has the spaces removed when shown in Web Player

Hi

I have created a GUI Skin for use with my app, Everything looks peachy in the Unity Editor when I run but when I export to the web player, any label or button will have the spaces removed from the text e.g.

    void OnGUI() {
      GUI.skin = MySkin;	
      GUI.Label(new Rect (20, 0,220,40), new GUIContent("This is a test"));
    
      if (GUI.Button(new Rect (20, 40,220,40), new GUIContent("Day or Night", btnTexture)))
                toggleNight();	
    }

Will show a label as “Thisisatest”
then my button with icon and the text “DayorNight”

I selected “Arial” as the default font, and using Bold with a size of 16.

Unity version 3.5, Export to Webplayer.

I have also made sure that the Rect is big enough.

There are no errors or warnings in the Unity Editor.

Any ideas what I’m doing wrong?

Thanks
Geoff

I’ve seen these recently (Unity 3.5.7f6, Windows 7). It has been happening for some time, then started working normally. Still not sure what caused it - would also like to know.

Ah ha, it is caused when you select BOLD as the font in the GUISkin. Put that back to “Normal” and the spaces came back. I guess I need to import the font manually and hope there is a separate Bold version of it.

Cheers
Geoff

Hmm, it is also WordWrap, if its not ticked then spaces get truncated again regardless if you select BOLD or Normal. Text clipping set to Overflow, using Arialbd.TTF as the top level font in the GUISkin, all other sections have font set to “none”, Stretch H+W not ticked.

All working with these settings now.

One thing I hate is Unity GUI, I spend more time in that than actual coding my product haha.

Hope it helps anyway.

Geoff