Skip to content

TextStudioFrame

StructTextStudioTextStudio
public readonly struct TextStudioFrame

Read-only frame view passed to every TextStudio.ITextStudioRenderer each pipeline tick. The view owns no buffers and does not allocate. Its data is engine-owned and may be overwritten or replaced by later ticks, so consumers that need stable historical data must copy only the values they retain.

public TextStudioGlyphColorQuad GetSourceColors(int glyphIndex)

Gets backend source corner colors for a glyph, falling back to opaque white.

Parameters

Name Type
glyphIndex System.Int32

Returns

TextStudio.TextStudioGlyphColorQuad

public float GetEffectUnitScale(int glyphIndex, float fallback = 1)

Gets the positive backend conversion scale for normalized effect units.

Parameters

Name Type
glyphIndex System.Int32
fallback System.Single

Returns

System.Single

public TextStudioGlyphColorBounds GetSourceColorBounds(int glyphIndex)

Gets source-color sampling bounds, or an invalid default when unavailable.

Parameters

Name Type
glyphIndex System.Int32

Returns

TextStudio.TextStudioGlyphColorBounds

public TextStudioPlanView Plan { get; }

The compiled plan (tokens, resolved text, segmentation, effect bindings).

Returns

TextStudio.TextStudioPlanView

public TextStudioReadOnlyBuffer<GlyphPlacement> Placements { get; }

Per-glyph placement results AFTER the placement strategy has run (Linear, Arc, Wave, …).

Returns

TextStudio.TextStudioReadOnlyBuffer{TextStudio.GlyphPlacement}

public int PlacementCount { get; }

Number of valid entries in TextStudio.TextStudioFrame.Placements.

Returns

System.Int32

public TextStudioReadOnlyBuffer<Vector3> BasePositions { get; }

Per-glyph linear base positions produced by the active text backend.

Returns

TextStudio.TextStudioReadOnlyBuffer{UnityEngine.Vector3}

public TextStudioReadOnlyBuffer<TextStudioGlyphColorQuad> SourceColors { get; }

Per-glyph source vertex colors supplied by the active text backend.

Returns

TextStudio.TextStudioReadOnlyBuffer{TextStudio.TextStudioGlyphColorQuad}

public TextStudioReadOnlyBuffer<TextStudioGlyphColorBounds> SourceColorBounds { get; }

Per-glyph local bounds used to sample source corner colors.

Returns

TextStudio.TextStudioReadOnlyBuffer{TextStudio.TextStudioGlyphColorBounds}

public TextStudioReadOnlyBuffer<float> EffectUnitScales { get; }

Per-glyph conversion from normalized Text Studio effect units to backend-local units.

Returns

TextStudio.TextStudioReadOnlyBuffer{System.Single}

public PlacementMode PlacementMode { get; }

Current placement mode. Renderers that pre-bake positions may use this to shortcut Linear.

Returns

TextStudio.PlacementMode

public TextStudioReadOnlyBuffer<EvaluatedGlyphState> Animated { get; }

Per-glyph animated state (position offset, rotation, scale, color override, alpha, phase).

Returns

TextStudio.TextStudioReadOnlyBuffer{TextStudio.EvaluatedGlyphState}

public int AnimatedCount { get; }

Number of valid entries in TextStudio.TextStudioFrame.Animated.

Returns

System.Int32

public bool AnimatedStateIsUniform { get; }

Whether all valid animated entries carry the same rendered state.

Returns

System.Boolean

public TextStudioDirtyGlyphView Dirty { get; }

Per-glyph dirty bits indicating which glyphs changed since the last frame (for incremental writes).

Returns

TextStudio.TextStudioDirtyGlyphView

public TextStudioReadOnlyBuffer<TextStudioGlyphInstanceState> GlyphStates { get; }

Per-glyph composed layout, placement, and animation state.

Returns

TextStudio.TextStudioReadOnlyBuffer{TextStudio.TextStudioGlyphInstanceState}

public int GlyphStateCount { get; }

Number of valid entries in TextStudio.TextStudioFrame.GlyphStates.

Returns

System.Int32

public TextStudioReadOnlyBuffer<PresentationGlyph> PresentationGlyphs { get; }

Per-glyph presentation state after generic and add-on glyph substitution.

Returns

TextStudio.TextStudioReadOnlyBuffer{TextStudio.PresentationGlyph}

public int PresentationGlyphCount { get; }

Number of valid entries in TextStudio.TextStudioFrame.PresentationGlyphs.

Returns

System.Int32

public float RevealProgress { get; }

Normalized reveal progress (0..1).

Returns

System.Single

public DirtyFlags GlobalDirty { get; }

Dirty flags that changed between the last frame and this frame at the global (plan/layout/topology) level.

Returns

TextStudio.DirtyFlags

public float DeltaTime { get; }

Seconds since the previous hub tick.

Returns

System.Single

public float Time { get; }

Hub-local monotonically increasing time in seconds.

Returns

System.Single