TextStudioBackendLayoutData
public struct TextStudioBackendLayoutDataStructured zero-allocation layout publication request. Array inputs remain caller-owned and are copied into Text Studio storage only when committed successfully.
Constructors
Section titled “Constructors”
TextStudioBackendLayoutData(Vector3[], int)
Section titled “TextStudioBackendLayoutData(Vector3[], int)”public TextStudioBackendLayoutData(Vector3[] positions, int count)Starts a layout publication for the supplied positions. The array is read only during
TextStudio.TextStudioBackendLayoutBuilder.Commit(TextStudio.TextStudioBackendLayoutData%40).
Parameters
| Name | Type |
|---|---|
positions |
UnityEngine.Vector3[] |
count |
System.Int32 |
Methods
Section titled “Methods”
WithAutoFitGlyphMargin(float)
Section titled “WithAutoFitGlyphMargin(float)”public TextStudioBackendLayoutData WithAutoFitGlyphMargin(float margin)Returns a copy with additional glyph margin used by auto-fit calculations.
Parameters
| Name | Type | Description |
|---|---|---|
margin |
System.Single | Margin in backend layout units. |
Returns
TextStudio.TextStudioBackendLayoutData
WithSourceBaselineOffsets(float[])
Section titled “WithSourceBaselineOffsets(float[])”public TextStudioBackendLayoutData WithSourceBaselineOffsets(float[] offsets)Returns a copy with per-unit center-to-baseline offsets.
Parameters
| Name | Type | Description |
|---|---|---|
offsets |
System.Single[] | Caller-owned offsets read during commit. |
Returns
TextStudio.TextStudioBackendLayoutData
WithPlacementLines(LineRange[], int)
Section titled “WithPlacementLines(LineRange[], int)”public TextStudioBackendLayoutData WithPlacementLines(LineRange[] lines, int count)Returns a copy with line ranges used by placement strategies.
Parameters
| Name | Type |
|---|---|
lines |
TextStudio.LineRange[] |
count |
System.Int32 |
Returns
TextStudio.TextStudioBackendLayoutData
WithSourceColors(TextStudioGlyphColorQuad[], bool[], TextStudioGlyphColorBounds[])
Section titled “WithSourceColors(TextStudioGlyphColorQuad[], bool[], TextStudioGlyphColorBounds[])”public TextStudioBackendLayoutData WithSourceColors(TextStudioGlyphColorQuad[] colors, bool[] validity = null, TextStudioGlyphColorBounds[] bounds = null)Returns a copy with immutable source color samples and their optional validity metadata.
Parameters
| Name | Type |
|---|---|
colors |
TextStudio.TextStudioGlyphColorQuad[] |
validity |
System.Boolean[] |
bounds |
TextStudio.TextStudioGlyphColorBounds[] |
Returns
TextStudio.TextStudioBackendLayoutData
WithSourceVisualBounds(TextStudioGlyphVisualBounds[])
Section titled “WithSourceVisualBounds(TextStudioGlyphVisualBounds[])”public TextStudioBackendLayoutData WithSourceVisualBounds(TextStudioGlyphVisualBounds[] bounds)Returns a copy with per-unit source visual bounds for sizing-aware placement and effects.
Parameters
| Name | Type |
|---|---|
bounds |
TextStudio.TextStudioGlyphVisualBounds[] |
Returns
TextStudio.TextStudioBackendLayoutData
WithEffectUnitScales(float[])
Section titled “WithEffectUnitScales(float[])”public TextStudioBackendLayoutData WithEffectUnitScales(float[] scales)Returns a copy with per-unit scale normalization for renderer-neutral effects.
Parameters
| Name | Type |
|---|---|
scales |
System.Single[] |
Returns
TextStudio.TextStudioBackendLayoutData
WithSemanticMappings(int[], int[])
Section titled “WithSemanticMappings(int[], int[])”public TextStudioBackendLayoutData WithSemanticMappings(int[] textUnitToLineIndex, int[] textUnitToWordIndex)Returns a copy with mappings from text units to semantic line and word indices.
Parameters
| Name | Type |
|---|---|
textUnitToLineIndex |
System.Int32[] |
textUnitToWordIndex |
System.Int32[] |
Returns
TextStudio.TextStudioBackendLayoutData
WithSourceAlignment(Vector2)
Section titled “WithSourceAlignment(Vector2)”public TextStudioBackendLayoutData WithSourceAlignment(Vector2 alignment)Returns a copy with normalized source alignment, from bottom-left (0, 0) to top-right (1, 1).
Parameters
| Name | Type |
|---|---|
alignment |
UnityEngine.Vector2 |
Returns
TextStudio.TextStudioBackendLayoutData
Properties
Section titled “Properties”
public int Count { get; }Number of positions to publish.
Returns
System.Int32