How to manually integrate Text Animator
Last updated
Last updated
Ptssss. check if your Dialogue System is already integrated here: Integrated Plugins & Dialogues Systems.
All Dialogue Systems are different, except for one thing: setting the text.
In theory you could simply integrate your plugin by replacing âtmpro.text=dialogue;
â to âtypewriter.ShowText(dialogue);
â, but hereâs a more extended guide with different cases.
Be aware that itâs highly suggested to disable your plugin typewriter (if you plan to use it) and use the TextAnimatorâs one (so you will be able to use all its features).
Dialogue Systems that have their own formatting might make this procedure more complex. Please read the following diagram for more info.
Do not hesitate to contact us if you need more explanations or need help.
Hereâs a written guide as well.
âď¸ Replace your pluginâs typewriter with the TextAnimatorâs one.
â If you canât replace DialogueSystemâs typewriter, try setting the value âUse Easy Integration
â to false (TextAnimator component) and check if animations are working correctly (based on the multitudes of DialogueSystems out there, success is not guaranteed).
This option however is not suggested, since performance may highly vary. Please use the built-in typewriter.
With âCustom actionsâ itâs intended âactions performed while showing the textâ, like âwaiting for playerâs inputâ etc.
âď¸ If youâre using a TextAnimatorPlayer
:
Read how to implement custom actions here: Writing Custom Actions (C#)
â If you canât use a TextAnimatorPlayer
:
You donât need to implement any custom action (since theyâre already present on the Dialogue Systemâs typewriter). As you know, however, using external typewriters is not recommended and may impact your projectâs performance.
These tags should be used by the DialogueSystem to build the textâs string. They should not cause any issue, so you do not have to replace or modify anything (including opening and closing chars). Example of hypothetical ânames/managementâ tags:
{actor1}
â writes in the text the name of the first character that is speaking.
|getValue("eatenApple")|
â writes in the text a variable
Text Example
"{actor1}, why did you eat |getValue("eatenApple")| apples?! Omg"
â âKaren, why did you eat 1234567 apples?! Omgâ â As you see, no tags are shown in the final text. This case will work without any needed implementation with Text Animator.
If your Dialogue System has styles text tags (like <bold>
for bold), be sure that the tags of your Dialogue System match the Text Animator and Text Mesh Pro ones (in the previous example, replace <bold>
with <b>
).
If your Dialogue System has tags that perform any action (like âplaying an audioâ), take a look here: Writing Custom Actions (C#)
Also, be sure to check already implemented functionalities: Wait Actions when typing