A downloadable asset pack

This script is no longer being updated and may break on newer versions of Unity!

A tiny 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.

Also includes a TextMeshPro friendly version and an example project.

Feel free to use this script in anyway you please.

StatusReleased
CategoryAssets
Release date Oct 29, 2016
Rating
Rated 5.0 out of 5 stars
(5 total ratings)
AuthorGeorge Blackwell
Made withUnity
Tagsasset, c-sharp, dialogue, script, Text based, Unity, User Interface (UI), writing
Code licenseMIT License
Asset licenseCreative Commons Attribution v4.0 International

Download

Download
Text Typerwriter.zip 23 MB
Download
TextTyper.cs 3 kB
Download
TextTyperTMP.cs 3 kB

Install instructions

The script can be applied to any standard Unity Text UI component. There is an example project included in the download, which provides a demonstration of how the script works.

Comments

Log in with itch.io to leave a comment.

I made some modification to your version cause it lacked something.
But I need help, about text typewriter effect, it becomes broken when pausing the current type effect and starting new(even if clearing both output text and input text.)

Hey, when you say broken, what part of the functionality breaks? The whole thing? Also, what modifications did you make? It'll help me figure out the issue :)

i made function that takes string and calls your type writer effect. and also added bool and checked to loop the same text with typewriter effect. and if i add that function i added into button and if i press it "once" everything is fine. but i wanted it to be like some dialogue system in some 2d games(where user could choose to see the full text being showed slowly with TW effect or just skip and new text will override and start the effect again). When i try to pause the current type effect and start new(even if clearing both output text and input text.) it becomes broken and shows text like this :
For eg.
Text 1 : Hello World!
Text 2 : This is simple effect.
But output will be like this(if i try to stop text 1 and start effect on text 2) : HeThliol Wis orlsim..... and so on.
Please help. I could send you the script file if you wanna see the code.
Thank you

From your description it sounds like the first co-routine isn't ending before the new one starts, so it's running them simultaneously. But you're welcome to send me you're script, so I can take a better look

(2 edits) (+1)

Here is the script : [LINK REMOVED]
Please try it and give feedback and fixes.


EDIT : I found solution for it and fixed it. I also created my own typewriter effect. Thanks to your script to help me understand the effect.

(+1)

I like your script easy and cool thanks. :)

Glad you found it useful! :)

(+1)

I used this script on my Load Screens for my game, if you wanna check! :D

Game link:

https://m-ody.itch.io/polaris

Many Thanks!

Awesome! Glad you found it useful :)

(+1)

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!

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.