Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by kapuscianyglab · Jul 17, 2013 at 10:52 AM · guicolormenumenu-item

How can I change color in GUI text? I have problem

Hi All.

I have problem with changing color in GUI text. I found following solve: http://answers.unity3d.com/questions/8055/how-do-i-change-the-color-of-a-font-in-a-guitext.html "You have to create a new material, indeed. But, the following details are essential to this problem.

  1. The material Shader has to be GUI/Text Shader (instead of the default Diffuse one).

  2. You have to choose what color do you want your text to have using the color selection box for the Text Color field (you can even have semi-transparent fonts if you modify the alpha value).

  3. Every font comes with a font texture (as a child of a font in the Project panel). In the new material you created you have to select your font's texture in the Font Texture field. Now, if you go in the GUI Text in the Inspector and use this new material, you should see your text displayed correctly. If you are not happy with the color, you can go back and modify your new material properties any time."

I made first 2 steps but I have problem with 3 step. What is "font's textures"? How to do it?

Second solve which I found is this script:

 #pragma strict
 
 var color:Color;
 
 function Start () {
 
     guiText.material.color = color;
 }
 
 function Update () {
 
 }

But if I set this in inspector attached to GUI text and click "play game" - text is hidden

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Unity_gamer · Jul 17, 2013 at 11:51 AM 0
Share

When you create a Guitext with a particular Font you can see "$$anonymous$$aterial" option just underneath the "Font".When you change the Font by default the material will also get changed according to the custom Font you are using.If you click on the Font in the inspector you can see that Font inside your Project folder.With that font you can see the corresponding material and texture which is used to create that font.

avatar image moghes · Jul 17, 2013 at 01:14 PM 0
Share

Have 2 difference fonts with 2 different colors and assign the fonts to the guitexts

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by kapuscianyglab · Jul 23, 2013 at 06:01 PM

Problem solved. After update Unity to 4.2 version, change color is available in GUI text in Inspector.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

17 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

menu item and add gadjet 1 Answer

GUI, character selection & general menu 1 Answer

an UP-TO-DATE menu tutorial 1 Answer

How do I make a colour editor UI? 1 Answer

Game Menus WIth Keyboard Input Control 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges