0
\$\begingroup\$

I have some text where different letters can be different colors:

enter image description here

I'd like to use the Animation feature to transition each letter frame-by-frame until they are white, like this:

enter image description here

The challenge is that each letter is made using a Prefab ("White Letter"), where the Text Mesh Pro Font Color starts off as White. So the Animation tab looks like this, with the RGBA values all set to 1:

enter image description here

After the prefab is instantiated, then the start values for the Font Color look like this:

enter image description here

I'd like to have the initial RGBA values of the Font Color to be "whatever the current color is" and then transition all of the Font Colors to white.

Is it possible to have the Animation tab start values initialize as the current Font Color of the GameObject?

\$\endgroup\$
1
  • \$\begingroup\$ This looks like a good use case to animate in code. \$\endgroup\$
    – DMGregory
    Commented Apr 15, 2023 at 12:05

1 Answer 1

2
\$\begingroup\$

Hackish solution:

Put two texts on top of each other, with the only difference that the one on top is colored and the one below is white. So the colored text completely obscures the white text. Then animate the alpha-property of the colored text to go from 1 to 0, so the white text becomes more visible.

\$\endgroup\$
1
  • \$\begingroup\$ That's brilliant! I just want to see how it will look for now so will try this. If it looks good, I'll animate in code as DMGregory suggests! \$\endgroup\$
    – kanamekun
    Commented Apr 15, 2023 at 13:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .