This is a typewriter effect for Unity UI. More...
Classes | |
class | AutoScrollSettings |
Public Member Functions | |
void | Awake () |
void | Start () |
void | OnEnable () |
void | OnDisable () |
void | Pause () |
Pauses the effect. More... | |
void | Unpause () |
Unpauses the effect. More... | |
void | PlayText (string text) |
Play typewriter on text immediately. More... | |
IEnumerator | Play () |
Plays the typewriter effect. More... | |
void | Stop () |
Stops the effect. More... | |
Static Public Member Functions | |
static string | StripRPGMakerCodes (string s) |
Public Attributes | |
bool | rightToLeft = false |
Set true to type right to left. More... | |
float | charactersPerSecond = 50 |
How fast to "type." More... | |
AudioClip | audioClip = null |
The audio clip to play with each character. More... | |
AudioClip[] | alternateAudioClips = new AudioClip[0] |
If specified, randomly use these clips or the main Audio Clip. More... | |
AudioSource | audioSource = null |
The audio source through which to play the clip. More... | |
bool | interruptAudioClip = false |
If audio clip is still playing from previous character, stop and restart it when typing next character. More... | |
string | silentCharacters = string.Empty |
Don't play audio on these characters. More... | |
float | fullPauseDuration = 1f |
Duration to pause on when text contains '\. More... | |
float | quarterPauseDuration = 0.25f |
Duration to pause when text contains '\,' More... | |
bool | removeDuplicateTypewriterEffects = true |
Ensures this GameObject has only one typewriter effect. More... | |
bool | playOnEnable = true |
Play using the current text content whenever component is enabled. More... | |
bool | waitOneFrameBeforeStarting = false |
Wait one frame to allow layout elements to setup first. More... | |
AutoScrollSettings | autoScrollSettings = new AutoScrollSettings() |
Optional auto-scroll settings. More... | |
UnityEvent | onBegin = new UnityEvent() |
UnityEvent | onCharacter = new UnityEvent() |
UnityEvent | onEnd = new UnityEvent() |
Properties | |
bool | IsPlaying [get] |
Indicates whether the effect is playing. More... | |
This is a typewriter effect for Unity UI.
It handles bold, italic, quad, and color rich text tags and certain RPGMaker-style tags. It also works with any text alignment.
void PixelCrushers.DialogueSystem.UnityUITypewriterEffect.Awake | ( | ) |
void PixelCrushers.DialogueSystem.UnityUITypewriterEffect.OnDisable | ( | ) |
void PixelCrushers.DialogueSystem.UnityUITypewriterEffect.OnEnable | ( | ) |
void PixelCrushers.DialogueSystem.UnityUITypewriterEffect.Pause | ( | ) |
Pauses the effect.
IEnumerator PixelCrushers.DialogueSystem.UnityUITypewriterEffect.Play | ( | ) |
Plays the typewriter effect.
void PixelCrushers.DialogueSystem.UnityUITypewriterEffect.PlayText | ( | string | text | ) |
Play typewriter on text immediately.
text |
void PixelCrushers.DialogueSystem.UnityUITypewriterEffect.Start | ( | ) |
void PixelCrushers.DialogueSystem.UnityUITypewriterEffect.Stop | ( | ) |
Stops the effect.
|
static |
void PixelCrushers.DialogueSystem.UnityUITypewriterEffect.Unpause | ( | ) |
Unpauses the effect.
The text will resume at the point where it was paused; it won't try to catch up to make up for the pause.
AudioClip [] PixelCrushers.DialogueSystem.UnityUITypewriterEffect.alternateAudioClips = new AudioClip[0] |
If specified, randomly use these clips or the main Audio Clip.
AudioClip PixelCrushers.DialogueSystem.UnityUITypewriterEffect.audioClip = null |
The audio clip to play with each character.
AudioSource PixelCrushers.DialogueSystem.UnityUITypewriterEffect.audioSource = null |
The audio source through which to play the clip.
If unassigned, will look for an audio source on this GameObject.
AutoScrollSettings PixelCrushers.DialogueSystem.UnityUITypewriterEffect.autoScrollSettings = new AutoScrollSettings() |
Optional auto-scroll settings.
float PixelCrushers.DialogueSystem.UnityUITypewriterEffect.charactersPerSecond = 50 |
How fast to "type."
float PixelCrushers.DialogueSystem.UnityUITypewriterEffect.fullPauseDuration = 1f |
Duration to pause on when text contains '\.
'
bool PixelCrushers.DialogueSystem.UnityUITypewriterEffect.interruptAudioClip = false |
If audio clip is still playing from previous character, stop and restart it when typing next character.
UnityEvent PixelCrushers.DialogueSystem.UnityUITypewriterEffect.onBegin = new UnityEvent() |
UnityEvent PixelCrushers.DialogueSystem.UnityUITypewriterEffect.onCharacter = new UnityEvent() |
UnityEvent PixelCrushers.DialogueSystem.UnityUITypewriterEffect.onEnd = new UnityEvent() |
bool PixelCrushers.DialogueSystem.UnityUITypewriterEffect.playOnEnable = true |
Play using the current text content whenever component is enabled.
float PixelCrushers.DialogueSystem.UnityUITypewriterEffect.quarterPauseDuration = 0.25f |
Duration to pause when text contains '\,'
bool PixelCrushers.DialogueSystem.UnityUITypewriterEffect.removeDuplicateTypewriterEffects = true |
Ensures this GameObject has only one typewriter effect.
bool PixelCrushers.DialogueSystem.UnityUITypewriterEffect.rightToLeft = false |
Set true
to type right to left.
string PixelCrushers.DialogueSystem.UnityUITypewriterEffect.silentCharacters = string.Empty |
Don't play audio on these characters.
bool PixelCrushers.DialogueSystem.UnityUITypewriterEffect.waitOneFrameBeforeStarting = false |
Wait one frame to allow layout elements to setup first.
|
get |
Indicates whether the effect is playing.
true
if this instance is playing; otherwise, false
.