PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProTypewriterEffect Class Reference

This is a typewriter effect for TextMesh Pro. More...

Inheritance diagram for PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProTypewriterEffect:
Collaboration diagram for PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProTypewriterEffect:

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 Rewind ()
 
void PlayText (string text)
 Play typewriter on text immediately. More...
 
IEnumerator Play ()
 Plays the typewriter effect. More...
 
void Stop ()
 Stops the effect. More...
 

Public Attributes

float charactersPerSecond = 50
 How fast to "type." More...
 
AudioClip audioClip = null
 The audio clip to play with each character. 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...
 
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...
 
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...
 
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...
 

Detailed Description

This is a typewriter effect for TextMesh Pro.

Note: Handles RPGMaker codes, but not two codes next to each other.

Member Function Documentation

◆ Awake()

void PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProTypewriterEffect.Awake ( )

◆ OnDisable()

void PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProTypewriterEffect.OnDisable ( )

◆ OnEnable()

void PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProTypewriterEffect.OnEnable ( )

◆ Pause()

void PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProTypewriterEffect.Pause ( )

Pauses the effect.

◆ Play()

IEnumerator PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProTypewriterEffect.Play ( )

Plays the typewriter effect.

◆ PlayText()

void PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProTypewriterEffect.PlayText ( string  text)

Play typewriter on text immediately.

Parameters
text

◆ Rewind()

void PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProTypewriterEffect.Rewind ( )

◆ Start()

void PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProTypewriterEffect.Start ( )

◆ Stop()

void PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProTypewriterEffect.Stop ( )

Stops the effect.

◆ Unpause()

void PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProTypewriterEffect.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.

Member Data Documentation

◆ audioClip

AudioClip PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProTypewriterEffect.audioClip = null

The audio clip to play with each character.

◆ audioSource

AudioSource PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProTypewriterEffect.audioSource = null

The audio source through which to play the clip.

If unassigned, will look for an audio source on this GameObject.

◆ autoScrollSettings

AutoScrollSettings PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProTypewriterEffect.autoScrollSettings = new AutoScrollSettings()

Optional auto-scroll settings.

◆ charactersPerSecond

float PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProTypewriterEffect.charactersPerSecond = 50

How fast to "type."

◆ fullPauseDuration

float PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProTypewriterEffect.fullPauseDuration = 1f

Duration to pause on when text contains '\.

'

◆ interruptAudioClip

bool PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProTypewriterEffect.interruptAudioClip = false

If audio clip is still playing from previous character, stop and restart it when typing next character.

◆ onBegin

UnityEvent PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProTypewriterEffect.onBegin = new UnityEvent()

◆ onCharacter

UnityEvent PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProTypewriterEffect.onCharacter = new UnityEvent()

◆ onEnd

UnityEvent PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProTypewriterEffect.onEnd = new UnityEvent()

◆ playOnEnable

bool PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProTypewriterEffect.playOnEnable = true

Play using the current text content whenever component is enabled.

◆ quarterPauseDuration

float PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProTypewriterEffect.quarterPauseDuration = 0.25f

Duration to pause when text contains '\,'

◆ removeDuplicateTypewriterEffects

bool PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProTypewriterEffect.removeDuplicateTypewriterEffects = true

Ensures this GameObject has only one typewriter effect.

◆ silentCharacters

string PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProTypewriterEffect.silentCharacters = string.Empty

Don't play audio on these characters.

◆ waitOneFrameBeforeStarting

bool PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProTypewriterEffect.waitOneFrameBeforeStarting = false

Wait one frame to allow layout elements to setup first.

Property Documentation

◆ IsPlaying

bool PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProTypewriterEffect.IsPlaying
get

Indicates whether the effect is playing.

true if this instance is playing; otherwise, false.


The documentation for this class was generated from the following file: