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
1
Question by tax 1 · Sep 27, 2010 at 07:49 AM · guifont3dtext

Cant change color of 3dText/Text Mesh

I seem to have problems changing the color of 3dtext objects.

The color property is grayed out.

Any idea on what im doing wrong?

/tax

Comment
Add comment
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

3 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by tax 1 · Sep 27, 2010 at 09:03 AM

Meanwhile in Copenhagen....

I made a C# script with the following code:

using UnityEngine; using System.Collections;

public class TextColor : MonoBehaviour { public Color color; void Awake() { transform.GetComponent<MeshRenderer>().material.SetColor("_Color", color); } }

In this way I can drag it on to the 3dtext object and set its color. Remember to set the alpha color if it goes all transparent on you.

/tax

Comment
Add comment · Show 1 · 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 mcroswell · Dec 03, 2010 at 08:17 PM 0
Share

Thank you so much.

I did have a few $$anonymous$$utes of trouble since I did not read your note about setting the alpha. It would be nice if color did not go to pure transparent by default. :-)

Here's a slight mod to your script that I am now using: public Color color = new Color(1,0,1,1); // Default to RGBA values of Purple (1,0,1,... and Pure Opacity 1)

Again, a big thanks to you in Copenhagen from Colorado!

avatar image
0

Answer by Mike 3 · Sep 27, 2010 at 08:39 AM

You need to create a new material, drag in the texture for the font you're using and choose your wanted shader, then you can modify the colour

Add that to the Text Mesh and it should hopefully work

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 dertom.du · Nov 13, 2010 at 04:58 PM 0
Share

The mentioned font texture is created automatically when you import your ttf-Font and is added as 'child-node' of your font in the project.

avatar image bradmarxmoosepi · Apr 29, 2012 at 02:36 PM 0
Share

And remember to set the material shader to GUI/Text Shader

avatar image
0

Answer by NChicunque · Sep 01, 2013 at 02:31 PM

Just put the alpha to 1

var miColor : Color;

function Start()

{

    renderer.material.color = miColor;

    //Para que se vea el texto

    renderer.material.color.a = 1;

}

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

1 Person is following this question.

avatar image

Related Questions

Is there a way to measure the pixel with/height of a string with a given font? 2 Answers

Sometimes the GUI selectively doesn't render some letters 1 Answer

Display TM symbol in enum on GUI 1 Answer

Odd question... can a GUIText object be displayed upside-down? 2 Answers

Possible to change GUI.Label fontsize without using GUIStyle? 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