1

I have a treasure counter text object. It's goldish yellowish. Every other text object I make has the same color. When I try to change the color in the inspector (they aren't parented) all text objects change color.

If I make it blue then my weapon counter, lives counter, and score counter all become blue. I even tried making another canvas but it still didn't work.

halfer
  • 19,824
  • 17
  • 99
  • 186
John
  • 197
  • 1
  • 17
  • What component are you changing the color of specifically? Can you post an image of what you are attempting to change? And what font / how your text components are set up? Changing the color on the instanced font material will change all font colors but changing the color on the TMP_Text component will change that once instances color – TEEBQNE May 17 '21 at 02:55
  • It sounds like you are changing the color in the material .. make sure to use a different material for the different instances – derHugo May 17 '21 at 03:48

1 Answers1

1

You are likely changing the color of the text material. This, as you've noticed, applies to everything using that material, you can either create more materials or more conveniently: use the Vertex Color property on the TextMeshPro object to set it for that particular object.

If you use vertex colors, you should set the material back to a full white as they will mix otherwise.

Set the Vertex Color here

grapefrukt
  • 27,016
  • 6
  • 49
  • 73
  • I'm currently finding that when I set the material for a TMPro label to a different material, it changes ALL TMPro labels on the canvas to that same material. Feels like a bug. – Ash Aug 13 '23 at 05:24