GridPlacement
public class GridPlacement : IPlacementContextStrategy, IPlacementStrategyGrid placement: arranges glyphs in a grid pattern.
Fields
Section titled “Fields”
columns
Section titled “columns”[Min(1)]public int columnsReturns
System.Int32
cellSizing
Section titled “cellSizing”[Tooltip("Auto derives cell dimensions from rendered glyph bounds. Fixed uses Cell Size.")]public GridCellSizing cellSizingReturns
TextStudio.GridCellSizing
cellSize
Section titled “cellSize”[Tooltip("Authored cell dimensions used when Cell Sizing is Fixed.")]public Vector2 cellSizeReturns
UnityEngine.Vector2
[Tooltip("Additional horizontal and vertical space between cells.")]public Vector2 gapReturns
UnityEngine.Vector2
[Tooltip("Whether rows or columns fill first.")]public GridFlow flowReturns
TextStudio.GridFlow
reverse
Section titled “reverse”[Tooltip("Reverses the fill direction.")]public bool reverseReturns
System.Boolean
respectSourceLines
Section titled “respectSourceLines”[Tooltip("Starts each rendered source line on a new grid row. Applies to Rows First flow.")]public bool respectSourceLinesReturns
System.Boolean
Methods
Section titled “Methods”
ComputePlacements(Vector3[], GlyphPlacement[], int)
Section titled “ComputePlacements(Vector3[], GlyphPlacement[], int)”public void ComputePlacements(Vector3[] layoutPositions, GlyphPlacement[] placements, int glyphCount)Compute placements for all visible glyphs.
Parameters
| Name | Type | Description |
|---|---|---|
layoutPositions |
UnityEngine.Vector3[] | Input: baseline positions from the layout engine. |
placements |
TextStudio.GlyphPlacement[] | Output: final 3D placements. |
glyphCount |
System.Int32 | Number of glyphs. |
ComputePlacements(in PlacementContext, GlyphPlacement[])
Section titled “ComputePlacements(in PlacementContext, GlyphPlacement[])”public void ComputePlacements(in PlacementContext context, GlyphPlacement[] placements)Writes placements for every visible glyph using its current layout and line metadata.
Parameters
| Name | Type |
|---|---|
context |
TextStudio.PlacementContext |
placements |
TextStudio.GlyphPlacement[] |
Constructors
Section titled “Constructors”
GridPlacement()
Section titled “GridPlacement()”public GridPlacement()Properties
Section titled “Properties”
public PlacementMode Mode { get; }Returns
TextStudio.PlacementMode