Skip to content

TextStudio2DFauxDepthSpec

StructTextStudioTextStudio
public struct TextStudio2DFauxDepthSpec

Settings for silhouette extrusion direction, taper, falloff, edge softness, paint mapping, and contour lighting.

TextStudio2DFauxDepthSpec(Vector2, float, float, float, TextStudio2DUnit)

Section titled “TextStudio2DFauxDepthSpec(Vector2, float, float, float, TextStudio2DUnit)”
public TextStudio2DFauxDepthSpec(Vector2 offset, float taper = 0, float falloff = 0, float softness = 0, TextStudio2DUnit units = TextStudio2DUnit.Em)

Creates a faux-depth specification with the supplied extrusion offset, taper, falloff, softness, and measurement units.

Parameters

NameType
offsetUnityEngine.Vector2
taperSystem.Single
falloffSystem.Single
softnessSystem.Single
unitsTextStudio.TextStudio2DUnit

public TextStudio2DFauxDepthSpec WithSilhouetteOutset(float silhouetteOutset)

Expands the source contour before tracing depth so an extrusion can carry an outer stroke silhouette.

Parameters

NameType
silhouetteOutsetSystem.Single

Returns

TextStudio.TextStudio2DFauxDepthSpec

public TextStudio2DFauxDepthSpec WithEndFade(float endFade)

Fades the terminal portion of the extrusion while preserving its direction.

Parameters

NameType
endFadeSystem.Single

Returns

TextStudio.TextStudio2DFauxDepthSpec

WithPaintMapping(TextStudio2DFauxDepthPaintMapping)

Section titled “WithPaintMapping(TextStudio2DFauxDepthPaintMapping)”
public TextStudio2DFauxDepthSpec WithPaintMapping(TextStudio2DFauxDepthPaintMapping paintMapping)

Maps the layer paint either through its normal surface space or from the face toward the depth endpoint.

Parameters

NameType
paintMappingTextStudio.TextStudio2DFauxDepthPaintMapping

Returns

TextStudio.TextStudio2DFauxDepthSpec

WithLighting(float, float, float, float, float)

Section titled “WithLighting(float, float, float, float, float)”
public TextStudio2DFauxDepthSpec WithLighting(float sideLightAngle, float sideLightStrength, float frontBevelWidth = 0, float frontBevelStrength = 0, float farCapShade = 0)

Adds contour lighting plus restrained near-face and far-cap depth responses.

Parameters

NameType
sideLightAngleSystem.Single
sideLightStrengthSystem.Single
frontBevelWidthSystem.Single
frontBevelStrengthSystem.Single
farCapShadeSystem.Single

Returns

TextStudio.TextStudio2DFauxDepthSpec

public TextStudio2DFauxDepthSpec WithUnits(TextStudio2DUnit units)

Returns a faux-depth specification copy using the supplied measurement units.

Parameters

NameType
unitsTextStudio.TextStudio2DUnit

Returns

TextStudio.TextStudio2DFauxDepthSpec

public Vector2 Offset { get; }

Returns

UnityEngine.Vector2

public float Taper { get; }

Returns

System.Single

public float Falloff { get; }

Returns

System.Single

public float Softness { get; }

Returns

System.Single

public float SilhouetteOutset { get; }

Returns

System.Single

public float EndFade { get; }

Returns

System.Single

public TextStudio2DFauxDepthPaintMapping PaintMapping { get; }

Returns

TextStudio.TextStudio2DFauxDepthPaintMapping

public float SideLightAngle { get; }

Returns

System.Single

public float SideLightStrength { get; }

Returns

System.Single

public float FrontBevelWidth { get; }

Returns

System.Single

public float FrontBevelStrength { get; }

Returns

System.Single

public float FarCapShade { get; }

Returns

System.Single

public TextStudio2DUnit Units { get; }

Returns

TextStudio.TextStudio2DUnit