RichTextEffect
Resource for a custom rich-text drawing effect.
Subclass RichTextEffect and override _ProcessCustomFX. Apply it through RichTextLabel.PushCustomfx, add text and close the span with Pop. For a custom BBCode tag, register the resource through InstallEffect: its name comes from a script property named bbcode or the script filename.
The handler receives a reused CharFXTransform for a glyph and drawing pass. Modify Offset, Color, Transform, GlyphIndex or Visible and return true to continue the chain. Do not create entities or rebuild rich-text items inside the drawing handler; keep animation state separately.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
RichTextEffectConstructor
public RichTextEffect();Creates an effect resource. The base resource without _ProcessCustomFX implementation provides no custom animation; attach a subclass to RichTextLabel.
Methods1
_ProcessCustomFXbool
public virtual bool _ProcessCustomFX(CharFXTransform charFX);Processes a glyph in the current pass. Modify charFX output fields; true allows subsequent custom effects, false skips them for this glyph/pass. false neither rolls back changed fields nor substitutes for Visible false. Do not assume one call per character per frame; the context object is reused.
| Name | Type | Default |
|---|---|---|
charFX | CharFXTransform | — |
charFXReused current glyph/pass context; do not dispose it in the handler.
boolProcesses a glyph in the current pass. Modify charFX output fields; true allows subsequent custom effects, false skips them for this glyph/pass. false neither rolls back changed fields nor substitutes for Visible false. Do not assume one call per character per frame; the context object is reused.