Skip to content

TextStudio2DStyleSettings

StructTextStudioTextStudio
public struct TextStudio2DStyleSettings

Serializable appearance settings with independently owned layer data.

public TextStudio2DLayer GetLayer(int index)

Returns a defensive copy of one authored layer.

Parameters

NameType
indexSystem.Int32

Returns

TextStudio.TextStudio2DLayer

public void SetLayers(TextStudio2DLayer[] layers)

Replaces the layer stack with a defensive deep copy.

Parameters

NameType
layersTextStudio.TextStudio2DLayer[]

SetInheritance(TextStudio2DStyleAsset, TextStudio2DStyleInheritanceMode)

Section titled “SetInheritance(TextStudio2DStyleAsset, TextStudio2DStyleInheritanceMode)”
public void SetInheritance(TextStudio2DStyleAsset baseStyle, TextStudio2DStyleInheritanceMode mode)

Sets the base style and inheritance mode, repairs local layer identities and solo states, and advances the settings revision.

Parameters

NameType
baseStyleTextStudio.TextStudio2DStyleAsset
modeTextStudio.TextStudio2DStyleInheritanceMode

SetRenderingOptions(TextStudio2DSourceFieldQuality, TextStudio2DPainterOrder, TextStudio2DWorldShadowMode)

Section titled “SetRenderingOptions(TextStudio2DSourceFieldQuality, TextStudio2DPainterOrder, TextStudio2DWorldShadowMode)”
public void SetRenderingOptions(TextStudio2DSourceFieldQuality sourceFieldQuality, TextStudio2DPainterOrder painterOrder, TextStudio2DWorldShadowMode worldShadowMode)

Sets source-field quality, painter ordering, and world-shadow behavior, then advances the settings revision.

Parameters

NameType
sourceFieldQualityTextStudio.TextStudio2DSourceFieldQuality
painterOrderTextStudio.TextStudio2DPainterOrder
worldShadowModeTextStudio.TextStudio2DWorldShadowMode
public void SetExactLayering(bool exactLayering)

Sets whether the style keeps Text Studio’s exact layered rendering (TextStudio2DStyleSettings.ExactLayering), then advances the settings revision.

Parameters

NameType
exactLayeringSystem.Boolean

SetExposures(TextStudioAppearanceExposure[])

Section titled “SetExposures(TextStudioAppearanceExposure[])”
public void SetExposures(TextStudioAppearanceExposure[] exposures)

Replaces the settings exposure declarations with independent copies and advances the settings revision.

Parameters

NameType
exposuresTextStudio.TextStudioAppearanceExposure[]

public TextStudio2DStyleAsset BaseStyle { get; }

Returns

TextStudio.TextStudio2DStyleAsset

public TextStudio2DStyleInheritanceMode InheritanceMode { get; }

Returns

TextStudio.TextStudio2DStyleInheritanceMode

public TextStudio2DSourceFieldQuality SourceFieldQuality { get; }

Returns

TextStudio.TextStudio2DSourceFieldQuality

public TextStudio2DPainterOrder PainterOrder { get; }

Returns

TextStudio.TextStudio2DPainterOrder

public TextStudio2DWorldShadowMode WorldShadowMode { get; }

Returns

TextStudio.TextStudio2DWorldShadowMode

public bool ExactLayering { get; }

Keeps Text Studio’s exact layered rendering. Off, the default, draws a style TextMeshPro can express (one solid fill, a round stroke and a distance-field outer shadow at Native source quality) through the text’s TextMeshPro SDF material.

Returns

System.Boolean

public int ItemCount { get; }

Returns

System.Int32

public static TextStudio2DStyleSettings Empty { get; }

No default treatment; named appearances remain available.

Returns

TextStudio.TextStudio2DStyleSettings

public TextStudioAppearanceExposure[] Exposures { get; }

Returns

TextStudio.TextStudioAppearanceExposure[]

public static TextStudio2DStyleSettings Default { get; }

A new editable white fill, matching a newly created 2D Style asset.

Returns

TextStudio.TextStudio2DStyleSettings