tmpro.text=dialogue;
” to “textAnimatorPlayer.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. Read the following diagram for more info.
Integration Diagram
Do not hesitate to contact me 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 (Called “Text Animator Players”).
❌ 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.
tmproText.maxVisibleCharacters++
, you can simply call “textAnimator.maxVisibleCharacters
”, which works in a similar way but will manages all your effects as well.tmpro.maxVisibleCharacters++
” part and replace it with textAnimator.maxVisibleCharacters++
. You’d also have to implement TextAnimator’s events and features, since they’re handled by TextAnimatorPlayers and won’t work without an implementation.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"{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 Performing Actions while typing