Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/baba-s/tmp_typewriter
Typewriter for TextMesh Pro. TMP_Typewriter prints out characters one by one. ( Required the DOTween. )
https://github.com/baba-s/tmp_typewriter
kogane-unity-lib textmeshpro unity unity-script unity3d
Last synced: 3 months ago
JSON representation
Typewriter for TextMesh Pro. TMP_Typewriter prints out characters one by one. ( Required the DOTween. )
- Host: GitHub
- URL: https://github.com/baba-s/tmp_typewriter
- Owner: baba-s
- License: mit
- Created: 2018-12-25T05:35:25.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-25T12:38:41.000Z (about 6 years ago)
- Last Synced: 2024-10-10T10:24:19.088Z (3 months ago)
- Topics: kogane-unity-lib, textmeshpro, unity, unity-script, unity3d
- Language: ShaderLab
- Homepage: http://baba-s.hatenablog.com/entry/2018/12/26/090000
- Size: 1.05 MB
- Stars: 91
- Watchers: 4
- Forks: 12
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TMP_Typewriter
Typewriter for TextMesh Pro. TMP_Typewriter prints out characters one by one. ( Required the DOTween. )
[![](https://img.shields.io/github/release/baba-s/TMP_Typewriter.svg?label=latest%20version)](https://github.com/baba-s/TMP_Typewriter/releases)
[![](https://img.shields.io/github/release-date/baba-s/TMP_Typewriter.svg)](https://github.com/baba-s/TMP_Typewriter/releases)
![](https://img.shields.io/badge/Unity-2017.4%2B-red.svg)
![](https://img.shields.io/badge/.NET-3.5%2B-orange.svg)
[![](https://img.shields.io/github/license/baba-s/TMP_Typewriter.svg)](https://github.com/baba-s/TMP_Typewriter/blob/master/LICENSE)## Features
- Support for Rich Text
- Skippable
- Can pause and resume
- OnComplete callback
- Compatible with [CharTweener](https://github.com/mdechatech/CharTweener)## Version
- Unity 2018.3.0f2
- TextMesh Pro 1.3.0
- DOTween 1.2.055## How To Use
![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20181225/20181225152543.png)
1. Download and import .unitypackage from [Releases](https://github.com/baba-s/TMP_Typewriter/releases).
2. Add a TMP_Typewriter component to the GameObject.
3. Add `using KoganeUnityLib;` and call the `TMP_Typewriter.Play`.## Example
### Normal
![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20181224/20181224115900.gif)
```cs
m_typewriter.Play
(
text : "ABCDEFG HIJKLMN OPQRSTU",
speed : m_speed,
onComplete : () => Debug.Log( "Complete !" )
);
```### Rich Text
![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20181224/20181224115909.gif)
```cs
m_typewriter.Play
(
text : @"ABCDEFG HIJKLMN OPQRSTU",
speed : m_speed,
onComplete : () => Debug.Log( "Complete !" )
);
```### Sprite
![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20181224/20181224115917.gif)
```cs
m_typewriter.Play
(
text : @"",
speed : m_speed,
onComplete : () => Debug.Log( "Complete !" )
);
```### Skip
![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20181224/20181224115929.gif)
```cs
m_typewriter.Skip(); // with onComplete callback
m_typewriter.Skip( false ); // without onComplete callback
```### Pause & Resume
![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20181225/20181225202540.gif)
```cs
m_typewriter.Pause();
m_typewriter.Resume();
```### Other
![](https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20181225/20181225210140.gif)
Compatible with [CharTweener](https://github.com/mdechatech/CharTweener).