GithubHelp home page GithubHelp logo

templeblock / tmp_typewriter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from baba-s/tmp_typewriter

0.0 0.0 0.0 1.07 MB

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

Home Page: http://baba-s.hatenablog.com/entry/2018/12/26/090000

License: MIT License

C# 6.97% ShaderLab 81.25% HLSL 11.78%

tmp_typewriter's Introduction

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.

tmp_typewriter's People

Contributors

baba-s avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.