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 sophiadaniels · Jan 09, 2012 at 11:14 PM · guitextguiskin

apply GUI styles to GUIText

i've added some GUIText to a scene. and of course it's flat white. i've figured out how to change the size and font and in theory change the material, though i just want to change the color.

i looked at using GUISkins but as far as i can tell that's exclusivly for when you're creating the GUI elements with code.

is there a way to add GUIText to a scene and then have it use a GUISkin or some other store of styles?

all of the tutorials and examples i can find only cover code generated GUIs... is visually laying out an interface simply doing it the wrong way? and if so why am i even able to add un-skinnable GUIText objects to my scene?

Comment
Add comment · Show 1
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 sophiadaniels · Jan 09, 2012 at 09:06 PM 0
Share

this wouldn't be a problem if you could just set the font color for GUIText GameObjects. or if the materials actually worked ins$$anonymous$$d of turning into boxes. apparently GUI/TextShader is the wrong shader for gui text materials.

1 Reply

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

Answer by Eric5h5 · Jan 09, 2012 at 11:43 PM

GUIText/GUITexture was the original GUI system, before OnGUI code existed. Although GUIText does have the advantage of being able to use bitmap color fonts, rather than only TTF fonts. When you make a new material for GUIText, you also have to set the font as well as adding the font texture to the material...it's not enough just to apply the material, because it needs to know how to access the texture properly to create the letters, so it needs font information from the font as well as the texture. GUI/TextShader is correct.

Comment
Add comment · Show 3 · 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
avatar image sophiadaniels · Jan 10, 2012 at 12:04 AM 0
Share

how do i get unity to generate a font texture? (found out solid colors don't work) or do i need to find some other software that'll do that. :( i just want to change the font color... i don't care about super fancy styles. this is turning what should be a property you set into something more complex then most of the other elements i have in my scene.

avatar image sophiadaniels · Jan 10, 2012 at 12:07 AM 0
Share

expand the font and it'll be there.

avatar image sophiadaniels · Jan 10, 2012 at 12:10 AM 0
Share

also note: the select button in the inspector probably won't show the font texture in any usable way... so drag and drop it from the font.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

GUI Text as a Button? 1 Answer

Style dynamically created GUI Text 0 Answers

GUItext works 1 of 3 situations? 0 Answers

Draw GuiText on 2d tile sprite Like 2048 game 0 Answers

Display GUI Text 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