Some Unity c# code for exposition story text.
- simulate the experience of watching somebody type into a command prompt
- use secret '█' character to insert brief hesitations
- use secret '⌐' character to backspace and remove a typed character
- use secret 'µ' character to clearscreen
- the | cursor will blink at the end
- newlines will push all lines up, scrolling them away at X value
- supports adding a sound effect for typing sound effects
This was made to support a story in a game that is delivered through sequences of watching the text type out on screen.
Yes. There is a class called TypeWriterText.cs that can go directly on a text object to make it type in. That component is not as flexibile as the StoryScroller.cs. It was an older system I reused many times and I included it here.
- Put StoryScroller.cs on a gameObject in the scene.
- For my ChapterOne.cs example, put that on a gameObject too.
- link Text_obj on the StoryScroller.cs to a textmesh pro text object in your scene.
- Hit play and ChapterOne will begin.
- To write your own lines into StoryScroller, see ChapterOne example. It's very simple.