Script documentation

Modular3DText.cs in TinyGiantStudio.Text namespace

If anything except method names starts with a capital letter, it's a property.

Utility

Variables

VariableTypeDescription

Text

string

Text or any property changes trigger an automatic update of the mesh at the frame's end. This avoids wasting resources on needless calculations when multiple properties change in the same frame. The Advanced setting can alter this behavior.

Font

Material

Material

FontSize

Vector3

Assigning a new font size recreates the entire text. This is to avoid interfering with anything any module is doing.

oldText

string

This is used to check which letters need to be recreated/replaced by comparing to new text.

wordArray

string[]

characterObjectList

List<GameObject>

Contains a list of all the character gameobject created by Text.

Capitalize

bool

If both Capitalize and LowerCase are true, Capitalize is applied.

LowerCase

bool

If both Capitalize and LowerCase are true, Capitalize is applied.

destroyChildObjectsWithGameObject

bool

When text is updated, old characters are moved to their correct position if their position is moved by something like a module.

repositionOldCharacters

updateTextOncePerFrame

meshPostProcess

Methods

MethodDescription

CleanUpdateText ()

This will completely remove the old letters and create the complete text. Other methods of updating text will try to only update what's new. Example: Adding the 'e' at the end of the existing text "nam" will try to add only 'e' without touching the other text unnecessarily.

Mesh Combine

Variables

VariableTypeDescription

autoSaveMesh

bool

combineMeshInEditor

bool

combineMeshDuringRuntime

bool

assetPath

string

Where the prefab is saved.

This is only for some edge cases that can be enabled via advanced settings.

meshPaths

List<string>

useIncreasedVerticiesCountForCombinedMesh

bool

Changes mesh index format from 16 to 32 when set to true. Index format 16-bit takes less memory and bandwidth. Even if it is on, it doesn't change the index format if it is not needed.

Layout

VariableTypeDescription

AutoLetterSize

bool

If turned on, instead of using the predetermined size of each letter, their size is taken from the size they take in the render view. Please remember, this is letter size, this doesn't modify the font size.

WordSpacing

float

Modules

Variables

VariableTypeDescription

useModules

bool

applyModuleOnNewCharacter

bool

Apply modules when a new character is added.

applyModulesOnStart

bool

If turned on, adding modules will be automatically called when a prefab with existing text is instantiated on Start() instead of only when a new character is added.

applyModulesOnEnable

bool

If turned on, adding modules will be automatically called when a prefab with existing text is enabled instead of only when new character is added.

startAddingModuleFromChar

bool

If true, the adding module uses MonoBehavior attached to the character created to run its coroutine. This way, if the text is deactivated, the module isn't interrupted.

addingModules

startDeletingModuleFromChar

bool

If true, the deleting module uses MonoBehavior attached to the character created to run its coroutine. This way, if the text is deactivated, the module isn't interrupted.

deletingModules

customDeleteAfterDuration

bool

If set to true, deleteAfter float is used to determine when to delete a character.

deleteAfter

float

reApplyModulesToOldCharacters

bool

Methods

Method

GetDeleteDurationFromEffects ()

NewEffect ( List<ModuleContainer> moduleList ) NewEffect ( List<ModuleContainer> moduleList, Module newModule )

Create a new module for the module container passed as parameter. For example, addingModule or deletingModule can be passed. If no module is passed as second parameter, it creates an empty Effect.

Last updated