GUIText and font material problem [solved]

Hi all,

I’m trying to use a custom font( Twack.ttf) for my GUI but i don’t know why, i can’t change the text color in the corresponding font material, the color selector is disabled.

Sorry if it’s a newbie question but I searched everywhere before asking :slight_smile:

Thank in advance

First off, welcome to the forums! :smile:

You set font colors for UnityGUI elements via the GUISkin or GUIStyle being used by the element in question, not on the font material itself.

I want to set the font color on a GUIText, if i understang well the documentation, it’s not a components of new UnityGUI.

Anyway, i change my mind about the GUI, i have to do a 3d gui, because i want to animate it a lot, and it’s seem to be impossible with GUITexture (no rotation etc…)

If y try to make a 3D Text, i have the same problem than for the GUIText, I cannot change the color of the font material, everything is disabled. Any idea ?

You’re right, that was my mis-reading things, sorry about that!

FYI: for GUIText you can’t edit the default material created when you import your font. What you have to do is create a new material that uses the GUI/Text Shader, set the color you want then have that material use the font texture that came in with your font.

Same answer as above, make and apply a new material. :slight_smile:

It works ! Thank for your help !

I am trying to create a new material with a GUI/Text shader but that doesn’t appear to be a valid option. When I create a new material the only available shaders in the drop down are “none” and “FX-Water-Simple”. Am I missing something?

Yes. :slight_smile:

Unity includes something like 40 different shader options by default so you’re definitely missing something if all you see is “none” and FX-Water-Simple". Start off by creating a new, empty Unity project and do not include the standard or Pro assets when doing so (thus creating an entirely empty project). Then make a new material and try again. If that produces the same results then perhaps try reinstalling Unity as maybe you’ve somehow botched up the included shaders. Sorry I don’t have anything more definitive to offer but I’m just not sure how you’d get the results you’re describing.

Hey Tom, Thanks for the reply. I tried an empty project (with no assets) and now the shader list is completely empty. I’m going to do the re-install now but I’m curious if perhaps you think this has anything to do with me running the trial version?

I’m porting a game I wrote in Torque Game Builder to Unity to learn the ropes thus I haven’t picked up a license yet.

Off to re-install!

~Rob

Trial version or otherwise, the default shader options should still be there (our trials are fully functional, it’s just that they’re time limited and show a trial watermark). Keep us posted and drop me a PM if necessary so we can sort this out.

So, I did the re-install and still no dice on the shader. I attached a screen shot just in case I’m doing something totally wrong.

  1. Create an empty project (include no assets)
  2. Assets->Create->Material
  3. Click on the “New Material” in the assets list so that it is shown in the inspector
  4. Click the “Shader” drop down list (which shows None)

Thanks again for the help. This little hiccup aside, Unity is years ahead of Torque Game Builder and I’ve really enjoyed working with it so far.

You’re in debug mode…switch to normal mode.

–Eric

GREAT SUCCESS!! Thanks a ton. I think I turned on debug mode about day 4 into the 30 day trial and I never flipped it back.

Thanks again to you guys for the help. Hopefully I’ll have a nice demo for you all after I pick up a full license.