Hi, thanks for this. Very handy. How can I make it change the text line everytime I press a button? Let's say I'm using it for dialogues with NPC's. Thank you!
Unity UI Text Typewriter Script C#
A downloadable asset pack
A small C# script for simulating typing text in real time. Perfect for a typewriter or computer terminal. Feel free to make any changes to the script and use it in projects. I'd appreciate a link to your work if you decided to use the script.
Includes an example project as well as the script.
The script can be applied to any UI element as long as it has an audio source and a text component to interact with. There is an example project included in the download, which gives a demonstration of how the script works.
Log in with itch.io to leave a comment.
Thanks! I've updated the script to allow for new string updates. Attach the UpdateText() function to a button, feed in the new string you want to type out (NPC dialogue for example) and then whenever the button is clicked, it will type out the new text. I've also updated the example project if you want to get a better idea of how it works.