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

Name Type
id System.String
defaultApplyMode TextStudio.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

Name Type
exposures TextStudio.TextStudioAppearanceExposure[]
public void ApplySettings(TextStudio2DStyleSettings settings)

Copies appearance settings into this reusable asset.

Parameters

Name Type
settings TextStudio.TextStudio2DStyleSettings
public TextStudioStackItemId GetItemId(int index)

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

Parameters

Name Type
index System.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

Name Type
index System.Int32

Returns

TextStudio.TextStudio2DLayer

public void SetLayers(TextStudio2DLayer[] layers)

Replaces the authored stack with a defensive deep copy.

Parameters

Name Type
layers TextStudio.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

Name Type
baseStyle TextStudio.TextStudio2DStyleAsset
mode TextStudio.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

Name Type
sourceFieldQuality TextStudio.TextStudio2DSourceFieldQuality
painterOrder TextStudio.TextStudio2DPainterOrder
worldShadowMode TextStudio.TextStudio2DWorldShadowMode

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 int ItemCount { get; }

Returns

System.Int32

public TextStudio2DStyleSettings Settings { get; }

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

Returns

TextStudio.TextStudio2DStyleSettings