Possible to fade in the letters with a Typewriter?
Posted: Sat Mar 20, 2021 10:48 pm
Hey Tony and everyone
I'm experimenting with the typewriter effect, but I feel like it would fit our games' style a bit more if the letters faded in instead of appearing instantly. I didn't see anything out-of-the-box to have the letters fade in, so I started googling and found this: https://forum.unity.com/threads/have-wo ... st-6301222
I tested out that code snippet (I'm using TMPro) and it looked to work pretty well! So I'm wondering if I could combine their fade-in technique with the Typewriter.
My goal would be:
-Have text appear in the Typewriter fashion, but to fade in the characters instead of having them instantly appear.
-Keep the ability to use all of the parsing that the Typewriter can do (namely RPGMakerCodes for pauses/timing).
-Still be able to press the Continue button to "skip to the end" (aka instantly show the entire text) like how the Typewriter does it.
I don't have the most experience with doing custom stuff with TMPro, but this is what I see from looking at the Typewriter code and this TMPro-Fade code: The Typewriter uses 'maxVisibleCharacters' to have the characters appear. The TMPro-Fade code looks to be setting the vertex colors for each of the characters - controlling their Alpha so they fade in.
I feel like I should be able to take the Typewriter code as the starting point, and only change the necessary parts so that the characters are revealed using the TMPro-Fade method.
Any opinion on this being a good idea or not?
Thanks for any help!
I'm experimenting with the typewriter effect, but I feel like it would fit our games' style a bit more if the letters faded in instead of appearing instantly. I didn't see anything out-of-the-box to have the letters fade in, so I started googling and found this: https://forum.unity.com/threads/have-wo ... st-6301222
I tested out that code snippet (I'm using TMPro) and it looked to work pretty well! So I'm wondering if I could combine their fade-in technique with the Typewriter.
My goal would be:
-Have text appear in the Typewriter fashion, but to fade in the characters instead of having them instantly appear.
-Keep the ability to use all of the parsing that the Typewriter can do (namely RPGMakerCodes for pauses/timing).
-Still be able to press the Continue button to "skip to the end" (aka instantly show the entire text) like how the Typewriter does it.
I don't have the most experience with doing custom stuff with TMPro, but this is what I see from looking at the Typewriter code and this TMPro-Fade code: The Typewriter uses 'maxVisibleCharacters' to have the characters appear. The TMPro-Fade code looks to be setting the vertex colors for each of the characters - controlling their Alpha so they fade in.
I feel like I should be able to take the Typewriter code as the starting point, and only change the necessary parts so that the characters are revealed using the TMPro-Fade method.
Any opinion on this being a good idea or not?
Thanks for any help!