(C#) How can I make a rich text autotyper for an rpg dialogue box?
I am trying to create an autotyper script to display what characters are saying on the screen using a dialogue box (If you don't know what an autotyper is, it's what most rpg games use to display each letter of a sentence one at a time, as if it was being typed). I want it to be using the rich text UI element (optional bold, italics, color changes, etc. ). For an example of what I am talking about, I want it to be similar to this (old code) http://answers.unity3d.com/questions/50104/how-to-make-text-that-is-writen-automatically-lett.html , but using rich text instead. It will need to be able to have interchangeable fonts and be at least somewhat easy to use. So, can anyone help get me started? (If this has been answered before, please provide a link, but I couldn't find this anwhere.)
Can anyone please answer if you know ANYTHING about rich text, it doesn't matter how much, I'm clueless.
Answer by Jessespike · Jul 19, 2016 at 06:45 PM
UI Text components have a Rich Text property, which is enabled by default. Use markups to decorate the text. For example: <size=30>Some <color=yellow>RICH</color> text</size>
Unfortunately, I don't know any ways to use multiple fonts in the same UI Text. You may have to get creative and use multiple UI Text in the same dialogue if you want multiple fonts.
https://docs.unity3d.com/Manual/StyledText.html
https://docs.unity3d.com/Manual/script-Text.html
https://unity3d.com/learn/tutorials/topics/user-interface-ui/ui-text
Your answer
Follow this Question
Related Questions
how do i reference to a text objects text in scripting? 2 Answers
My text doesn't appear in the gameview 1 Answer
How To Load TTF Font From External File 0 Answers
How to link up instantiated text in list to allow buttons to adjust number shown, c# 1 Answer
Removing an item from Inventory and updating item count on HUD 0 Answers