• 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
3
Question by cmos · Aug 02, 2012 at 09:17 PM · gui text

GUI Text Background Color

I am using GUI Text (not by script) and would like to add a background color / box behind it. How can I do this?

Thanks, Chris

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 gocraig · Dec 04, 2015 at 01:02 AM 1
Share

I added an image, but with no image ... hmm, I filled the image to black and then added my text component as a child of the image, which seems to do the job.

I know I am 3 years late, but figured it might help someone searching for this answer :-)

1 Reply

· Add your reply
  • Sort: 
avatar image
2

Answer by fafase · Aug 02, 2012 at 09:32 PM

You could add a GUITexture. Then you position them on top of each other. Problem is that you might get your GUIText behind. You need to give a higher z-position value in the transform to the GUIText to appear on the front.

Comment
Add comment · Show 2 · 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 jahames · Sep 25, 2017 at 10:48 PM 0
Share

This isn't enough any longer. https://imgur.com/FENeiYG

edit: I just made the texture 20% opaque by adding using the alpha channel https://imgur.com/4k94S3j quick fix for me, not really a great solution for OP

avatar image fafase jahames · Sep 27, 2017 at 06:47 AM 0
Share

That answer is from 2012 and about the legacy GUI system. Why bother?

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

9 People are following this question.

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

Related Questions

GUI script for Wave start. 1 Answer

How do I change the position of GUI text? 1 Answer

RaycastHit to call GUI Text 1 Answer

Project R-a-B: Cannot drag Count Text into PlayerController.cs 1 Answer

how to Display time after game complete 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges