Skip to content

StrokeSpec

StructTextStudio.ThreeDTextStudio.3D
public struct StrokeSpec

Parameters for the “true outline” stroke pass. When TextStudio.ThreeD.StrokeSpec.width is greater than zero, the geometry generator replaces the layer’s source silhouette with a ring-shaped silhouette that follows the glyph boundary at the requested width. The result is a hollow annulus of material that — once extruded — becomes a 3D tube hugging every edge of the glyph (exterior AND counters of O, A, B, e, …), visible from every angle.

Unlike the legacy "scaled backplate" outline (a bigger solid glyph behind the main one), a stroke emits genuine ring geometry that can be independently beveled, twisted, tapered, swept along a path, or assigned its own material. A single layer may declare multiple strokes to produce concentric rings in one pass (classic comic-book / varsity looks), each with its own width, alignment, join style and material overrides.

[Tooltip("Stroke width in local units. 0 disables this stroke entry entirely.")]
[Min(0)]
public float width

Returns

System.Single

[Tooltip("Additional signed offset from the source silhouette. Positive moves the stroke band outward; negative moves it inward. Use this for separated multi-ring outlines so outer bands do not overlap inner bands.")]
public float offset

Returns

System.Single

[Tooltip("Where the stroke sits relative to the source silhouette: Center straddles the boundary; Inside lies fully within the glyph; Outside forms a halo ring around the glyph.")]
public StrokeAlignment alignment

Returns

TextStudio.ThreeD.StrokeAlignment

[Tooltip("Join style for stroke corners. Miter is sharp (matches the glyph outline), Round inserts an arc fan, Bevel inserts a single chamfer.")]
public BevelJoinType join

Returns

TextStudio.ThreeD.BevelJoinType

[Tooltip("Miter clamp for the stroke join.")]
[Min(1)]
public float miterLimit

Returns

System.Single

[Header("Per-Stroke Materials (optional)")]
[Tooltip("Override for the front face material on this stroke. null = inherit from the owning layer's faceMaterial.")]
public Material faceMaterial

Returns

UnityEngine.Material

[Tooltip("Override for the back face material on this stroke. null = inherit.")]
public Material backMaterial

Returns

UnityEngine.Material

[Tooltip("Override for the sides/body material on this stroke. null = inherit.")]
public Material sideMaterial

Returns

UnityEngine.Material

[Tooltip("Override for the trim material on this stroke. null = inherit.")]
public Material trimMaterial

Returns

UnityEngine.Material

Outline(float, StrokeAlignment, BevelJoinType)

Section titled “Outline(float, StrokeAlignment, BevelJoinType)”
public static StrokeSpec Outline(float width, StrokeAlignment alignment = StrokeAlignment.Center, BevelJoinType join = BevelJoinType.Miter)

Creates an enabled outline stroke with the requested alignment and corner-join policy.

Parameters

Name Type
width System.Single
alignment TextStudio.ThreeD.StrokeAlignment
join TextStudio.ThreeD.BevelJoinType

Returns

TextStudio.ThreeD.StrokeSpec

Outline(float, StrokeAlignment, BevelJoinType, Material)

Section titled “Outline(float, StrokeAlignment, BevelJoinType, Material)”
public static StrokeSpec Outline(float width, StrokeAlignment alignment, BevelJoinType join, Material faceAndSide)

Creates an enabled outline stroke and assigns one material to both its face and side regions.

Parameters

Name Type
width System.Single
alignment TextStudio.ThreeD.StrokeAlignment
join TextStudio.ThreeD.BevelJoinType
faceAndSide UnityEngine.Material

Returns

TextStudio.ThreeD.StrokeSpec

public bool IsEnabled { get; }

Returns

System.Boolean

public static StrokeSpec None { get; }

Returns

TextStudio.ThreeD.StrokeSpec