All Projects → redbluegames → unity-text-typer

redbluegames / unity-text-typer

Licence: MIT License
Text typing effect for Unity uGUI Text components

Programming Languages

C#
18002 projects
ShaderLab
938 projects
HLSL
714 projects

Projects that are alternatives of or similar to unity-text-typer

EmojiText
This is a EmojiText solution for Unity3D UI
Stars: ✭ 74 (-70.63%)
Mutual labels:  ugui
ugui-animated-progressbar
A progress bar with animation of uGUI.
Stars: ✭ 81 (-67.86%)
Mutual labels:  ugui
Xlua UGUI Demo
A MVC UGUI hot fix demo using Xlua.
Stars: ✭ 16 (-93.65%)
Mutual labels:  ugui
UnityScreenNavigator
Library for screen transitions, transition animations, transition history stacking, and screen lifecycle management in Unity's uGUI.
Stars: ✭ 488 (+93.65%)
Mutual labels:  ugui
RubyTextMeshPro
Unity Text Mesh Proでルビ(フリガナ)のタグを追加しました.
Stars: ✭ 61 (-75.79%)
Mutual labels:  ugui
Unity-VariableTileLayout
UI components for tile layout like Pinterenst.
Stars: ✭ 57 (-77.38%)
Mutual labels:  ugui
UBind
UBind is a value binding component for Unity, which is used to quickly realize the association binding between UI and logical data.
Stars: ✭ 57 (-77.38%)
Mutual labels:  ugui
AnKuchen
Control UI Prefab from Script Library
Stars: ✭ 83 (-67.06%)
Mutual labels:  ugui
DissolveEffectForUGUI
A dissolve effect for uGUI, without material instancing. Please star and watch this project :)
Stars: ✭ 67 (-73.41%)
Mutual labels:  ugui
CompositeToggle
Composite toggle system for unity
Stars: ✭ 38 (-84.92%)
Mutual labels:  ugui
MintAnimation
一款高效易用的Unity插值动画系统,可以快速制作UI动画
Stars: ✭ 84 (-66.67%)
Mutual labels:  ugui
YLYRichText
a feature-rich, easy to use unity rich text plugin
Stars: ✭ 32 (-87.3%)
Mutual labels:  ugui
unity-ugui-edit-tools
编辑器下的界面工具集合
Stars: ✭ 30 (-88.1%)
Mutual labels:  ugui
DissolveEffectForTMPro
DissolveEffectForTMPro provide dissolve effect component for TextMeshPro in Unity.
Stars: ✭ 86 (-65.87%)
Mutual labels:  ugui
BlurringAtlasForUGUI
A blur effect for uGUI in Unity, that is effective even for atlas images including dynamic fonts.
Stars: ✭ 29 (-88.49%)
Mutual labels:  ugui
WChatPanel
WChatPanel,a chat panel UI component for Unity3D such as wechat.
Stars: ✭ 32 (-87.3%)
Mutual labels:  ugui
WDataTable
WDataTable,a data form component for unity by ugui.
Stars: ✭ 38 (-84.92%)
Mutual labels:  ugui
Unity-PullToRefresh
Pull to refresh for Unity UI.
Stars: ✭ 73 (-71.03%)
Mutual labels:  ugui
BezierCanvas
Adobe Illustrator's pen tool style bezier editor on Unity.
Stars: ✭ 126 (-50%)
Mutual labels:  ugui
ReuseScroller
Reuse cell for uGUI ScrollView
Stars: ✭ 29 (-88.49%)
Mutual labels:  ugui

Unity-TextTyper

TextTyper is a text typing effect component for Unity. TextTyper prints out characters one by one to a uGUI Text component. Adapted by RedBlueGames from synchrok's GitHub project (https://github.com/synchrok/TypeText).

It's easy to find other examples of Text printing components, but TextTyper provides two major differences:

  • Correct wrapping as characters are printed
  • Support for Rich Text Tags

Note this verison of TextTyper requires TextMeshPro, which can be installed for free from the Package Manager in Unity 2018, or the Asset Store in older versions. If you want the version that is compatible with Unity's uGUI Text component, this branch or download this release.

How To Use

To start TextTyping all you need to do is add the TextTyper component to a unity Text widget:

  1. Create a GameObject with a Unity UI Text Widget, as normal.
  2. Add a TextTyper component to the GameObject.
  3. Call the TextTyper component's public functions TypeText and Skip to print the desired text with the specified delay. We call these from a 3rd component we call Talker.

You can optionally subscribe to the PrintCompleted and CharacterPrinted UnityEvents to add additional feedback like sounds and paging widgets.

Features

  • Define Text Speed Per Character: Mayday! <delay=0.05>S.O.S.</delay>
  • Support for uGUI Rich Text Tags: <b>,<i>,<size>,<color>,...
  • Additional delay for punctuation
  • Skip to end
  • OnComplete Callback
  • OnCharacterPrinted Callback (for audio)

Screenshots

TypeText Screenshot GIF Image of TextTyper in Sparklite (© RedBlueGames 2016)

The Code

The core of our text typer is a coroutine that’s triggered via the TypeText method. The coroutine has the following steps: Check next character to see if it’s the start of a Rich Text tag

  • If It’s a tag, parse it and apply it. Right now “applying” a tag just means modifying the print delay, but other tags could be added. Add it to a list of tags that need to be closed (because we have not yet reached the corresponding closing tag in our string). Move to next character and repeat
  • If it’s not a tag, print it
  • Wait for the print delay
  • Check if we are complete

The tool also uses RichTextTag.cs, a class that’s used to help with parsing. There are a few details I left out, but this should give you enough to start reading through the code if you want to know more.

How to Help

The easiest way to help with the project is to just to use it! As you use it, you can submit bugs and feature requests through GitHub issues.

Contributors

Issue Resporters

  • JonathanGorr

License and Credits

  • TypeText is under MIT license. See the LICENSE file for more info.
  • Typing sound effect (UITextDisplay.wav) provided by @kevinrmabie. Free for others to use, no attribution necessary.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].