Skip to content

Typewriter for TextMesh Pro. TMP_Typewriter prints out characters one by one. ( Required the DOTween. )

License

Notifications You must be signed in to change notification settings

baba-s/TMP_Typewriter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TMP_Typewriter

Typewriter for TextMesh Pro. TMP_Typewriter prints out characters one by one. ( Required the DOTween. )

Features

  • Support for Rich Text
  • Skippable
  • Can pause and resume
  • OnComplete callback
  • Compatible with CharTweener

Version

  • Unity 2018.3.0f2
  • TextMesh Pro 1.3.0
  • DOTween 1.2.055

How To Use

  1. Download and import .unitypackage from Releases.
  2. Add a TMP_Typewriter component to the GameObject.
  3. Add using KoganeUnityLib; and call the TMP_Typewriter.Play.

Example

Normal

m_typewriter.Play
(
    text        : "ABCDEFG HIJKLMN OPQRSTU",
    speed       : m_speed,
    onComplete  : () => Debug.Log( "Complete !" )
);

Rich Text

m_typewriter.Play
(
    text        : @"<size=64>ABCDEFG</size> <color=red>HIJKLMN</color> <sprite=0> <link=""https://www.google.co.jp/"">OPQRSTU</link>",
    speed       : m_speed,
    onComplete  : () => Debug.Log( "Complete !" )
);

Sprite

m_typewriter.Play
(
    text        : @"<sprite=0><sprite=0><sprite=1><sprite=2><sprite=3><sprite=4><sprite=5><sprite=6><sprite=7><sprite=8><sprite=9><sprite=10>",
    speed       : m_speed,
    onComplete  : () => Debug.Log( "Complete !" )
);

Skip

m_typewriter.Skip();        // with onComplete callback
m_typewriter.Skip( false ); // without onComplete callback

Pause & Resume

m_typewriter.Pause();
m_typewriter.Resume();

Other

Compatible with CharTweener.

About

Typewriter for TextMesh Pro. TMP_Typewriter prints out characters one by one. ( Required the DOTween. )

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published