Ignition / TextEffect

Namespace Playniax.Ignition

Inherits from MonoBehaviour

Script can be found in Assets/Playniax/Framework/Ignition/Framework/Core/Scripts (MonoBehaviour)/TextEffect.cs

Class TextEffect

Description

Create a text effect utilizing a TextMesh component, with built-in support for fading and motion.

Public fieldsDescription
float sustain = .5f Duration of time the text will remain fully visible before fading out.
float fadeTime = .25f Duration of time it takes for the text to fade out completely.
Color targetColor = new Color(1, 1, 1, 0) The target color the text will fade to.
Vector3 targetScale = Vector3.one The target scale the text will animate towards.
Vector3 velocity The current velocity of the text effect.
TextMesh textMesh The TextMesh component used for rendering text.
MeshRenderer meshRenderer The MeshRenderer component used for rendering the mesh.

Public MethodsDescription
static TextEffect Create(string text, Vector3 position, Font font, int fontSize = 21, float sustain = .25f, float fadeTime = .25f)Create a new instance of a text effect with specified parameters and return it. This method allows for the quick instantiation of text effects in a scene. It generates a GameObject with a TextEffect component attached, sets the text, position, font, font size, fade properties, and initializes the object's state. The method returns the created TextEffect instance for further use or manipulation.