Docsv3.31.0
Back to API Reference
Class

RevealHandler

abstract

Serializable glyph-appearance policy for RevealModifier. Custom handlers must transform only the current quad supplied to Apply, remain worker-thread safe, and resolve to the identity transform at RevealGlyphInfo.Progress = 1.

Derived Types(8)

Types that inherit from RevealHandler.

public float Duration{ get; set }

Seconds this effect takes to play for one glyph; 0 makes the change instant.

public TextUnits SupportedUnits{ get }

Granularities this effect is meaningful at. A reveal counting in one outside the set still plays the effect — the mismatch is reported, not corrected — so declare what the effect reads: an effect that only transforms its own quad accepts every granularity, while one that treats RevealGlyphInfo.unit as a body needs TextUnits.Grouping.

public abstract void Apply(in RevealGlyphInfo info)

Transforms the current glyph quad for its normalized appearance state.

protected static Vector2 ResolvePivot(in RevealGlyphInfo info, Vector2 pivot)

Resolves a normalized pivot against the current glyph quad, (0,0) being its bottom-left corner and (1,1) its top-right, as everywhere else in Unity. Values outside the unit square land outside the glyph, which is what an effect orbiting a point beside the glyph wants. Bilinear, so a sheared or rotated quad keeps the pivot where the glyph's own axes put it.

protected static void ApplyOffset(in RevealGlyphInfo info, float x, float y)

Offsets the current glyph quad without changing its final layout cell.

protected static void ApplyScale(in RevealGlyphInfo info, float x, float y, Vector2 pivot)

Scales the current glyph quad around a normalized pivot.

protected static void ApplyRotation(in RevealGlyphInfo info, float degrees, Vector2 pivot)

Rotates the current glyph quad around a normalized pivot.

protected static void ApplyFade(in RevealGlyphInfo info, float opacity)

Multiplies the current glyph quad's authored alpha by a normalized opacity.

protected static void ApplyTint(in RevealGlyphInfo info, Color32 tint, float amount)

Blends a multiplicative tint into the current glyph quad's authored colour.

protected static void ApplySkewX(in RevealGlyphInfo info, float shear, Vector2 pivot)

Applies horizontal shear to the current glyph quad around a normalized pivot.