Writing Custom TAnimPlayers (C#)
Last updated
Last updated
You're reading the documentation of an older/legacy version, Text Animator 1.X. To read the latest version, please visit this page instead . How to update:
By using "Text Animator for Unity" you can create your own custom typewriters, setting different types of delays between letters and much more. (If you want to learn about the default typewriter instead, read here).
In order to create a custom typewriter for your game, you need to to create a custom class that inherits from TAnimPlayerBase
You have to override/implement the following methods.
It tells how much time to wait for each character. This way, you can implement your own special characters that need an unique wait time.
Example
Waits for input in order to continue showing text.
Example:
You can also override the following methods for extra functionalities.
Override this method in case you want different disappearance wait times/speed. Otherwise, your custom textAnimatorPlayer will use the same delays as its typewriter (GetWaitAppearanceTimeOf);
Override this method to manage your custom actions. Read more here: Writing Custom Actions C#
Invoked every time the typewriter is starting to show the text. It doesn't fire up if the typewriter is set to false.
✅ That's it!
Have fun implementing your own players <3