Skip to content

TextStudioFrame

StructTextStudioTextStudio
public readonly struct TextStudioFrame

Read-only frame view passed to every 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 bool HasSourceLayout(int unit)

Returns whether the supplied unit has measured source layout, treating an empty validity buffer as complete coverage.

Parameters

Name Type
unit System.Int32

Returns

System.Boolean

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 TextStudioRenderPropertyGlyphView GetRenderProperties(int glyphIndex)

Gets the typed renderer-property values resolved for one glyph.

Parameters

Name Type
glyphIndex System.Int32

Returns

TextStudio.TextStudioRenderPropertyGlyphView

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 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<bool> SourceLayoutValidity { get; }

Optional per-unit measured layout coverage. Empty means complete coverage.

Returns

TextStudio.TextStudioReadOnlyBuffer{System.Boolean}

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; }

Authored placement mode. Valid Placements also include orientation and text-change interpolation in Linear mode.

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 TextStudioFrame.Animated.

Returns

System.Int32

public bool AnimatedStateIsUniform { get; }

Whether all valid animated entries carry the same rendered state.

Returns

System.Boolean

public TextStudioRenderPropertyView RenderProperties { get; }

Typed renderer properties stored independently from core per-glyph state.

Returns

TextStudio.TextStudioRenderPropertyView

public TextStudioRendererEffectExecutionView RendererEffectExecution { get; }

Final per-binding renderer ownership. Renderers must only execute prepared effects whose binding is selected here, even when they previously reported exact support.

Returns

TextStudio.TextStudioRendererEffectExecutionView

public CompiledTextStudio2DStyle AppearanceStyle { get; }

Persistent compiled 2D appearance, independent from animated effect properties.

Returns

TextStudio.CompiledTextStudio2DStyle

public CompiledTextStudioAppearancePlan AppearancePlan { get; }

Source-scoped composition of the default appearance and explicit invocations.

Returns

TextStudio.CompiledTextStudioAppearancePlan

public CompiledTextStudioWritingStyle WritingStyle { get; }

Persistent compiled writing treatment and prepared path sources.

Returns

TextStudio.CompiledTextStudioWritingStyle

public TextStudioGlyphTransitionView Transitions { get; }

Canonical per-unit Typewriter lifecycle for this frame.

Returns

TextStudio.TextStudioGlyphTransitionView

public bool EraseWritingOnHide { get; }

Returns

System.Boolean

public TextStudioVisualSnapshot VisualSnapshot { get; }

Renderer-neutral glyph, atlas, field, bounds, and source-version metadata.

Returns

TextStudio.TextStudioVisualSnapshot

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 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 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

public float PresentationTime { get; }

Presentation time in seconds for persistent visual treatments and glyph presentation. This clock restarts with presentation content and follows edit-mode preview seek and pause.

Returns

System.Single

public float PlaybackTime { get; }

Effect playback time in seconds. Unlike TextStudioFrame.Time, this clock may restart, seek, pause, or reverse when preview and playback controls request it.

Returns

System.Single

public TextStudioMotionPolicy MotionPolicy { get; }

Resolved accessibility policy for this frame, including the host's project preference.

Returns

TextStudio.TextStudioMotionPolicy