Class TAnimCore
Assembly: Febucci.TextAnimator.Runtime.dll
Syntax
public abstract class TAnimCore : MonoBehaviour
Fields
animationLoop
Controls when Text Animator should update its effects. Set it to Script if you want to control the animations from your own loop, invoking the Animate(Single) method.
Declaration
public AnimationLoop animationLoop
Field Value
Controls how default tags should be applied.\n"Fallback" will apply the effects only to characters that don't have any.\n"Constant" will apply the default effects to all the characters, even if they already have other tags via text.
Declaration
public TAnimCore.DefaultTagsMode defaultTagsMode
Field Value
isResettingTimeOnNewText
True if you want the animator's time to be reset on new text.
Declaration
public bool isResettingTimeOnNewText
Field Value
referenceFontSize
Font size that will be used as reference to keep animations consistent/uniform at different scales. Works only if useDynamicScaling is set to true.
Declaration
public float referenceFontSize
Field Value
time
Contains TextAnimator's current time values.
Declaration
Field Value
timeScale
Chooses which Time Scale to use when automatically animating effects (in other words, when the Update Mode is not set to Script). Set it to Unscaled if you want to animate effects even when the game is paused.
Declaration
public TimeScale timeScale
Field Value
typewriterStartsAutomatically
If the source text changes, should the typewriter start automatically?
Declaration
public bool typewriterStartsAutomatically
Field Value
useDefaultDatabases
True if you want to use the databases referenced in the TextAnimatorSettings asset, otherwise you can specify which databases to use in this component.
Declaration
public bool useDefaultDatabases
Field Value
useDefaultStyleSheet
Declaration
public bool useDefaultStyleSheet
Field Value
useDynamicScaling
True if you want the animations to be uniform/consistent across different font sizes. Default/Suggested to leave this as true, and change referenceFontSize. Otherwise, effects will move more when the text is smaller (requires less space on screen).
Declaration
public bool useDynamicScaling
Field Value
Properties
Actions
All the actions that have been parsed from the current text, and that will be used by a TypewriterCore component if present.
Declaration
public ActionMarker[] Actions { get; set; }
Property Value
true
if the text is entirely visible, including waiting for appearance effects to finish
(as they might still hide a character until the very end)
Declaration
public bool allLettersShown { get; }
Property Value
anyLetterVisible
true
if any letter is still visible in the text
Declaration
public bool anyLetterVisible { get; }
Property Value
Appearances
All the appearance effects that are applied to the current text.
Declaration
public AnimationRegion[] Appearances { get; set; }
Property Value
Behaviors
All the behavior effects that are applied to the current text.
Declaration
public AnimationRegion[] Behaviors { get; set; }
Property Value
Characters
The array of characters currently present in the text.
Declaration
public CharacterData[] Characters { get; }
Property Value
CharactersCount
Declaration
public int CharactersCount { get; }
Property Value
DatabaseActions
Declaration
public ActionDatabase DatabaseActions { get; set; }
Property Value
DatabaseAppearances
Declaration
public AnimationsDatabase DatabaseAppearances { get; set; }
Property Value
DatabaseBehaviors
Declaration
public AnimationsDatabase DatabaseBehaviors { get; set; }
Property Value
Fallback/Constant tags that will be applied to the entire text, if no other tags are found, based on the defaultTagsMode value.
Declaration
public string[] DefaultAppearancesTags { get; set; }
Property Value
Fallback/Constant tags that will be applied to the entire text, if no other tags are found, based on the defaultTagsMode value.
Declaration
public string[] DefaultBehaviorsTags { get; set; }
Property Value
Fallback/Constant tags that will be applied to the entire text, if no other tags are found, based on the defaultTagsMode value.
Declaration
public string[] DefaultDisappearancesTags { get; set; }
Property Value
Disappearances
All the disappearance effects that are applied to the current text.
Declaration
public AnimationRegion[] Disappearances { get; set; }
Property Value
effectIntensityMultiplier
Declaration
public float effectIntensityMultiplier { get; set; }
Property Value
effectsAppearancesEnabled
Declaration
public static bool effectsAppearancesEnabled { get; }
Property Value
effectsBehaviorsEnabled
Declaration
public static bool effectsBehaviorsEnabled { get; }
Property Value
Events
Events that have been parsed from the current text, and that will be used by a TypewriterCore component if present.
Declaration
public EventMarker[] Events { get; set; }
Property Value
firstVisibleCharacter
Handles the very first character allowed to be visible in the text.
Declaration
public int firstVisibleCharacter { get; set; }
Property Value
isResettingEffectsOnNewText
Declaration
public bool isResettingEffectsOnNewText { get; }
Property Value
latestCharacterShown
Declaration
public CharacterData latestCharacterShown { get; }
Property Value
maxVisibleCharacters
Handles the very last character allowed to be visible in the text.
Declaration
public int maxVisibleCharacters { get; set; }
Property Value
onEvent
Declaration
public MessageEvent onEvent { get; }
Property Value
StyleSheet
Declaration
public StyleSheetScriptable StyleSheet { get; set; }
Property Value
text
Declaration
public string text { get; }
Property Value
textFull
Declaration
public string textFull { get; set; }
Property Value
textWithoutAnyTag
Declaration
public string textWithoutAnyTag { get; }
Property Value
textWithoutTextAnimTags
The text without any Text Animator tag
Declaration
public string textWithoutTextAnimTags { get; }
Property Value
updateMode
Declaration
public AnimationLoop updateMode { get; }
Property Value
Words
The array of words currently present in the text.
Declaration
public WordInfo[] Words { get; }
Property Value
WordsCount
Number of words in the text
Declaration
public int WordsCount { get; }
Property Value
Methods
Animate(Single)
Proceeds the text animation with the given deltaTime value.
Declaration
public void Animate(float deltaTime)
Parameters
Type |
Name |
Description |
Single |
deltaTime |
|
Examples
You could use this if animationLoop is set to Script and you want to control when to animate the text.
AppendText(String, Boolean)
Adds text to the already existing one, parsing its rich text tags.
Declaration
public void AppendText(string appendedText, bool hideText = false)
Parameters
Type |
Name |
Description |
String |
appendedText |
New text that you want to append
|
Boolean |
hideText |
|
CopyMeshFromSource(ref CharacterData[])
Declaration
protected abstract void CopyMeshFromSource(ref CharacterData[] characters)
Parameters
EnableAllEffects(Boolean)
Declaration
public static void EnableAllEffects(bool enabled)
Parameters
Type |
Name |
Description |
Boolean |
enabled |
|
EnableAppearances(Boolean)
Declaration
public static void EnableAppearances(bool enabled)
Parameters
Type |
Name |
Description |
Boolean |
enabled |
|
EnableAppearancesLocally(Boolean)
Declaration
public void EnableAppearancesLocally(bool value)
Parameters
Type |
Name |
Description |
Boolean |
value |
|
EnableBehaviors(Boolean)
Declaration
public static void EnableBehaviors(bool enabled)
Parameters
Type |
Name |
Description |
Boolean |
enabled |
|
EnableBehaviorsLocally(Boolean)
Declaration
public void EnableBehaviorsLocally(bool value)
Parameters
Type |
Name |
Description |
Boolean |
value |
|
ForceDatabaseRefresh()
Declaration
public void ForceDatabaseRefresh()
ForceMeshRefresh()
Declaration
public void ForceMeshRefresh()
GetCharactersCount()
Declaration
protected abstract int GetCharactersCount()
Returns
Declaration
protected virtual TagParserBase[] GetExtraParsers()
Returns
GetOriginalTextFromSource()
Declaration
public abstract string GetOriginalTextFromSource()
Returns
GetStrippedTextFromSource()
Declaration
public abstract string GetStrippedTextFromSource()
Returns
HasChangedRenderingSettings()
Declaration
protected abstract bool HasChangedRenderingSettings()
Returns
HasChangedText(String)
Declaration
protected abstract bool HasChangedText(string strippedText)
Parameters
Type |
Name |
Description |
String |
strippedText |
|
Returns
IsReady()
Declaration
protected abstract bool IsReady()
Returns
OnEnable()
Declaration
protected virtual void OnEnable()
OnForceMeshUpdate()
Declaration
protected abstract void OnForceMeshUpdate()
OnInitialized()
Called once when the component is initialized.
Declaration
protected virtual void OnInitialized()
PasteMeshToSource(CharacterData[])
Declaration
protected abstract void PasteMeshToSource(CharacterData[] characters)
Parameters
ResetEffectsTime(Boolean)
Declaration
public void ResetEffectsTime(bool skipAppearances)
Parameters
Type |
Name |
Description |
Boolean |
skipAppearances |
|
ResetState()
Declaration
ScheduleMeshRefresh()
Schedules that a mesh refresh is required as soon as possible, which will be applied before the next animation loop starts.
Declaration
public void ScheduleMeshRefresh()
SetAppearancesActive(Boolean)
Enables or disables appearance effects animation LOCALLY on this Text Animator component.
To change this globally, see SetAppearancesActive(Boolean)
Declaration
public void SetAppearancesActive(bool isCategoryEnabled)
Parameters
Type |
Name |
Description |
Boolean |
isCategoryEnabled |
|
SetBehaviorsActive(Boolean)
Enables or disables behavior effects animation LOCALLY on this Text Animator component.
To change this globally, see SetBehaviorsActive(Boolean)
Declaration
public void SetBehaviorsActive(bool isCategoryEnabled)
Parameters
Type |
Name |
Description |
Boolean |
isCategoryEnabled |
|
SetText(String)
Sets the text to Text Animator, parsing its rich text tags.
Declaration
public void SetText(string text)
Parameters
Type |
Name |
Description |
String |
text |
Full text that you want to paste, including rich text tags.
|
SetText(String, Boolean)
Sets the text to Text Animator, parsing its rich text tags.
Declaration
public void SetText(string text, bool hideText)
Parameters
SetTextToSource(String)
Declaration
public abstract void SetTextToSource(string text)
Parameters
Type |
Name |
Description |
String |
text |
|
SetVisibilityChar(Int32, Boolean)
Sets a character visibility.
Declaration
public void SetVisibilityChar(int index, bool isVisible)
Parameters
SetVisibilityEntireText(Boolean, Boolean)
Sets the visibility of the entire text, also allowing to play or skip effects.
Declaration
public void SetVisibilityEntireText(bool isVisible, bool canPlayEffects = true)
Parameters
SetVisibilityWord(Int32, Boolean)
Declaration
public void SetVisibilityWord(int index, bool isVisible)
Parameters
Type |
Name |
Description |
Int32 |
index |
Word's index. See WordsCount and the Words array.
|
Boolean |
isVisible |
Controls if the word should be visible
|
ShowAllCharacters(Boolean)
Turns all characters visible at the end of the frame (i.e. "a typewriter skip")
Declaration
public void ShowAllCharacters(bool skipAppearanceEffects)
Parameters
Type |
Name |
Description |
Boolean |
skipAppearanceEffects |
Set this to true if you want all letters to appear instantly (without any appearance effect)
|
TriggerRemainingEvents()
Declaration
public void TriggerRemainingEvents()
TriggerVisibleEvents()
Declaration
public void TriggerVisibleEvents()
UpdateEffects()
Declaration
public void UpdateEffects()