[SOLVED] How to tint a label? (and change opacity in runtime)

Hi!

I’d like to tint a label (to change the opacity in runtime), but didn’t find much information except this:

It’s said “DEPRECATED” but I don’t see any other way to do it, so… I followed the instructions:

image


After assigning the material in question to my label, the game crashes and I get a rain of errors (probably created by the same cause):

Is it the correct way to tint my label? If so, what did I do wrong? :thinking:

Just applied the small modification from there:

But it doesn’t work…

image
:arrow_down:


Note: when I apply the material, the label becomes transparent in the editor
image
:arrow_down:
image

Is there a workaround to control the opacity of my label? :thinking:

Try this:

go.set("#label", "color.w", 0.5)

3 Likes

Oh thank you it works, it was much simpler than I thought :thinking: I feel a bit ashamed.

I suppose this would be the same for outline, shadow etc. (in case of more “complex” labels)

Thanks :slight_smile:

1 Like

All properties that you can manipulate at runtime on the label can be found in the manual:

And in the API reference:

1 Like