TextStudio2DDecorationSpec
public struct TextStudio2DDecorationSpecSettings for decoration geometry, topology, reveal visibility, line patterns, and ordered surface treatments.
Constructors
Section titled “Constructors”
TextStudio2DDecorationSpec(TextStudio2DDecorationKind, float, float, Vector4, float)
Section titled “TextStudio2DDecorationSpec(TextStudio2DDecorationKind, float, float, Vector4, float)”public TextStudio2DDecorationSpec(TextStudio2DDecorationKind kind, float thickness, float offset = 0, Vector4 padding = null, float cornerRadius = 0)Creates a decoration specification with the supplied kind, thickness, offset, padding, and corner radius.
Parameters
| Name | Type |
|---|---|
kind |
TextStudio.TextStudio2DDecorationKind |
thickness |
System.Single |
offset |
System.Single |
padding |
UnityEngine.Vector4 |
cornerRadius |
System.Single |
Methods
Section titled “Methods”
WithPlateShape(float, TextStudio2DDecorationVerticalAnchor, TextStudio2DDecorationEndStyle, TextStudio2DDecorationEndStyle, float)
Section titled “WithPlateShape(float, TextStudio2DDecorationVerticalAnchor, TextStudio2DDecorationEndStyle, TextStudio2DDecorationEndStyle, float)”public TextStudio2DDecorationSpec WithPlateShape(float plateHeight, TextStudio2DDecorationVerticalAnchor verticalAnchor, TextStudio2DDecorationEndStyle leftEnd, TextStudio2DDecorationEndStyle rightEnd, float capSize = 0)Configures explicit plate height, anchor, end geometry, and cap size.
Parameters
| Name | Type |
|---|---|
plateHeight |
System.Single |
verticalAnchor |
TextStudio.TextStudio2DDecorationVerticalAnchor |
leftEnd |
TextStudio.TextStudio2DDecorationEndStyle |
rightEnd |
TextStudio.TextStudio2DDecorationEndStyle |
capSize |
System.Single |
Returns
TextStudio.TextStudio2DDecorationSpec
WithPlateWidth(float)
Section titled “WithPlateWidth(float)”public TextStudio2DDecorationSpec WithPlateWidth(float plateWidth)Returns a decoration specification copy with the supplied explicit plate width.
Parameters
| Name | Type |
|---|---|
plateWidth |
System.Single |
Returns
TextStudio.TextStudio2DDecorationSpec
WithShape(TextStudio2DDecorationShape, Vector4, float, int, float)
Section titled “WithShape(TextStudio2DDecorationShape, Vector4, float, int, float)”public TextStudio2DDecorationSpec WithShape(TextStudio2DDecorationShape shape, Vector4 cornerRadii = null, float squirclePower = 4, int polygonSides = 6, float starInset = 0.5)Returns a decoration copy with the supplied shape, corner radii, squircle power, polygon sides, and star inset.
Parameters
| Name | Type |
|---|---|
shape |
TextStudio.TextStudio2DDecorationShape |
cornerRadii |
UnityEngine.Vector4 |
squirclePower |
System.Single |
polygonSides |
System.Int32 |
starInset |
System.Single |
Returns
TextStudio.TextStudio2DDecorationSpec
WithCustomPolygon(Vector2[])
Section titled “WithCustomPolygon(Vector2[])”public TextStudio2DDecorationSpec WithCustomPolygon(Vector2[] points)Returns a decoration copy configured as a custom polygon with independently copied points.
Parameters
| Name | Type |
|---|---|
points |
UnityEngine.Vector2[] |
Returns
TextStudio.TextStudio2DDecorationSpec
WithGlyphSilhouette(float, float, bool)
Section titled “WithGlyphSilhouette(float, float, bool)”public TextStudio2DDecorationSpec WithGlyphSilhouette(float padding, float bridgeRadius = 0, bool fillHoles = true)Derives one retained backing from selected, posed font contours. Treatments apply to its union boundary.
Parameters
| Name | Type |
|---|---|
padding |
System.Single |
bridgeRadius |
System.Single |
fillHoles |
System.Boolean |
Returns
TextStudio.TextStudio2DDecorationSpec
WithBackplateVisibility(TextStudio2DBackplateVisibility)
Section titled “WithBackplateVisibility(TextStudio2DBackplateVisibility)”public TextStudio2DDecorationSpec WithBackplateVisibility(TextStudio2DBackplateVisibility visibility)Returns a decoration specification copy with the supplied visibility behavior during text reveal and hiding.
Parameters
| Name | Type |
|---|---|
visibility |
TextStudio.TextStudio2DBackplateVisibility |
Returns
TextStudio.TextStudio2DDecorationSpec
WithTopology(TextStudio2DDecorationTopology, bool)
Section titled “WithTopology(TextStudio2DDecorationTopology, bool)”public TextStudio2DDecorationSpec WithTopology(TextStudio2DDecorationTopology topology, bool acrossLineBreaks = false)Returns a decoration copy with the supplied topology and connection behavior across line breaks.
Parameters
| Name | Type |
|---|---|
topology |
TextStudio.TextStudio2DDecorationTopology |
acrossLineBreaks |
System.Boolean |
Returns
TextStudio.TextStudio2DDecorationSpec
WithTreatments(params TextStudio2DSurfaceTreatment[])
Section titled “WithTreatments(params TextStudio2DSurfaceTreatment[])”public TextStudio2DDecorationSpec WithTreatments(params TextStudio2DSurfaceTreatment[] treatments)Replaces the ordered surface treatments. Index zero is visually topmost.
Parameters
| Name | Type |
|---|---|
treatments |
TextStudio.TextStudio2DSurfaceTreatment[] |
Returns
TextStudio.TextStudio2DDecorationSpec
GetTreatment(int)
Section titled “GetTreatment(int)”public TextStudio2DSurfaceTreatment GetTreatment(int index)Returns an independent copy of the surface treatment at the specified index, throwing if the index is invalid.
Parameters
| Name | Type |
|---|---|
index |
System.Int32 |
Returns
TextStudio.TextStudio2DSurfaceTreatment
WithLine(TextStudio2DDecorationLineSpec)
Section titled “WithLine(TextStudio2DDecorationLineSpec)”public TextStudio2DDecorationSpec WithLine(TextStudio2DDecorationLineSpec line)Returns a decoration copy with the supplied line-pattern and font-metric settings.
Parameters
| Name | Type |
|---|---|
line |
TextStudio.TextStudio2DDecorationLineSpec |
Returns
TextStudio.TextStudio2DDecorationSpec
GetCustomPoint(int)
Section titled “GetCustomPoint(int)”public Vector2 GetCustomPoint(int index)Returns the custom polygon point at the specified index, throwing if the index is outside the point array.
Parameters
| Name | Type |
|---|---|
index |
System.Int32 |
Returns
UnityEngine.Vector2
Properties
Section titled “Properties”
BackplateVisibility
Section titled “BackplateVisibility”public TextStudio2DBackplateVisibility BackplateVisibility { get; }Returns
TextStudio.TextStudio2DBackplateVisibility
GlyphPadding
Section titled “GlyphPadding”public float GlyphPadding { get; }Returns
System.Single
GlyphBridgeRadius
Section titled “GlyphBridgeRadius”public float GlyphBridgeRadius { get; }Returns
System.Single
GlyphFillHoles
Section titled “GlyphFillHoles”public bool GlyphFillHoles { get; }Returns
System.Boolean
public TextStudio2DDecorationKind Kind { get; }Returns
TextStudio.TextStudio2DDecorationKind
Thickness
Section titled “Thickness”public float Thickness { get; }Returns
System.Single
Offset
Section titled “Offset”public float Offset { get; }Returns
System.Single
Padding
Section titled “Padding”public Vector4 Padding { get; }Returns
UnityEngine.Vector4
CornerRadius
Section titled “CornerRadius”public float CornerRadius { get; }Returns
System.Single
PlateHeight
Section titled “PlateHeight”public float PlateHeight { get; }Returns
System.Single
PlateWidth
Section titled “PlateWidth”public float PlateWidth { get; }Returns
System.Single
VerticalAnchor
Section titled “VerticalAnchor”public TextStudio2DDecorationVerticalAnchor VerticalAnchor { get; }Returns
TextStudio.TextStudio2DDecorationVerticalAnchor
LeftEnd
Section titled “LeftEnd”public TextStudio2DDecorationEndStyle LeftEnd { get; }Returns
TextStudio.TextStudio2DDecorationEndStyle
RightEnd
Section titled “RightEnd”public TextStudio2DDecorationEndStyle RightEnd { get; }Returns
TextStudio.TextStudio2DDecorationEndStyle
CapSize
Section titled “CapSize”public float CapSize { get; }Returns
System.Single
public TextStudio2DDecorationShape Shape { get; }Returns
TextStudio.TextStudio2DDecorationShape
CornerRadii
Section titled “CornerRadii”public Vector4 CornerRadii { get; }Returns
UnityEngine.Vector4
SquirclePower
Section titled “SquirclePower”public float SquirclePower { get; }Returns
System.Single
PolygonSides
Section titled “PolygonSides”public int PolygonSides { get; }Returns
System.Int32
StarInset
Section titled “StarInset”public float StarInset { get; }Returns
System.Single
CustomPointCount
Section titled “CustomPointCount”public int CustomPointCount { get; }Returns
System.Int32
Topology
Section titled “Topology”public TextStudio2DDecorationTopology Topology { get; }Returns
TextStudio.TextStudio2DDecorationTopology
ConnectAcrossLineBreaks
Section titled “ConnectAcrossLineBreaks”public bool ConnectAcrossLineBreaks { get; }Returns
System.Boolean
TreatmentCount
Section titled “TreatmentCount”public int TreatmentCount { get; }Returns
System.Int32
public TextStudio2DDecorationLineSpec Line { get; }Returns
TextStudio.TextStudio2DDecorationLineSpec