Skip to content

TextStudio2DStyleAsset

ClassTextStudioTextStudio
public sealed class TextStudio2DStyleAsset : ScriptableObject, ITextStudioStackAsset

Persistent 2D appearance stack compiled into renderer-specific execution plans.

public const int CurrentSchemaVersion = 7

Returns

System.Int32

SetTagIdentity(string, TextStudioAppearanceApplyMode)

Section titled “SetTagIdentity(string, TextStudioAppearanceApplyMode)”
public void SetTagIdentity(string id, TextStudioAppearanceApplyMode defaultApplyMode = TextStudioAppearanceApplyMode.Replace)

Sets a stable catalog ID independently from the asset filename. Empty IDs remain ordinary styles.

Parameters

NameType
idSystem.String
defaultApplyModeTextStudio.TextStudioAppearanceApplyMode

SetExposures(TextStudioAppearanceExposure[])

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

Replaces the asset exposure declarations with independent copies and notifies appearance consumers of the change.

Parameters

NameType
exposuresTextStudio.TextStudioAppearanceExposure[]
public void ApplySettings(TextStudio2DStyleSettings settings)

Copies appearance settings into this reusable asset.

Parameters

NameType
settingsTextStudio.TextStudio2DStyleSettings
public TextStudioStackItemId GetItemId(int index)

Returns the persistent stack-item identity of the layer at the specified index.

Parameters

NameType
indexSystem.Int32

Returns

TextStudio.TextStudioStackItemId

public TextStudio2DLayer GetLayer(int index)

Returns an independent copy of the layer at the specified index, throwing if the index is outside the layer array.

Parameters

NameType
indexSystem.Int32

Returns

TextStudio.TextStudio2DLayer

public void SetLayers(TextStudio2DLayer[] layers)

Replaces the authored 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)

Changes the optional base style and flattening behavior.

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)

Changes renderer-neutral field, painter-order, and world-shadow requests.

Parameters

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

Sets whether the style keeps Text Studio’s exact layered rendering (TextStudio2DStyleAsset.ExactLayering).

Parameters

NameType
exactLayeringSystem.Boolean

public TextStudio2DStyleAsset()

public int SchemaVersion { get; }

Returns

System.Int32

public string Id { get; }

Returns

System.String

public TextStudioAppearanceApplyMode DefaultApplyMode { get; }

Returns

TextStudio.TextStudioAppearanceApplyMode

public int Revision { get; }

Returns

System.Int32

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 TextStudio2DStyleSettings Settings { get; }

Returns an independent snapshot of this asset’s local settings.

Returns

TextStudio.TextStudio2DStyleSettings