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