Skip to content

TextStudioGlyphStateWriter

StructTextStudioTextStudio
public readonly struct TextStudioGlyphStateWriter

Allocation-free writer scoped to one registered authority lease.

TryGetState(int, out TextStudioGlyphInstanceState)

Section titled “TryGetState(int, out TextStudioGlyphInstanceState)”
public bool TryGetState(int glyphIndex, out TextStudioGlyphInstanceState state)

Returns the current state of an accessible glyph.

Parameters

Name Type
glyphIndex System.Int32
state TextStudio.TextStudioGlyphInstanceState

Returns

System.Boolean

ApplyPose(int, in TextStudioGlyphPose, float)

Section titled “ApplyPose(int, in TextStudioGlyphPose, float)”
public bool ApplyPose(int glyphIndex, in TextStudioGlyphPose pose, float weight = 1)

Blends a pose into an accessible glyph when transform authority is available.

Parameters

Name Type
glyphIndex System.Int32
pose TextStudio.TextStudioGlyphPose
weight System.Single

Returns

System.Boolean

public bool SetVelocities(int glyphIndex, Vector3 velocity, Vector3 angularVelocity)

Sets linear and angular velocity for an accessible glyph when velocity authority is available.

Parameters

Name Type
glyphIndex System.Int32
velocity UnityEngine.Vector3
angularVelocity UnityEngine.Vector3

Returns

System.Boolean

ApplyVisualResponse(int, in TextStudioGlyphVisualResponse)

Section titled “ApplyVisualResponse(int, in TextStudioGlyphVisualResponse)”
public bool ApplyVisualResponse(int glyphIndex, in TextStudioGlyphVisualResponse response)

Applies color, alpha, or scale response values to an accessible glyph.

Parameters

Name Type
glyphIndex System.Int32
response TextStudio.TextStudioGlyphVisualResponse

Returns

System.Boolean

ApplyCustomChannel(int, string, Vector4, float, EffectBlendMode, TextStudioSurfaceMask)

Section titled “ApplyCustomChannel(int, string, Vector4, float, EffectBlendMode, TextStudioSurfaceMask)”
public bool ApplyCustomChannel(int glyphIndex, string descriptorId, Vector4 value, float influence = 1, EffectBlendMode blendMode = EffectBlendMode.Override, TextStudioSurfaceMask surfaceMask = TextStudioSurfaceMask.All)

Applies a registered custom channel value to an accessible glyph.

Parameters

Name Type
glyphIndex System.Int32
descriptorId System.String
value UnityEngine.Vector4
influence System.Single
blendMode TextStudio.EffectBlendMode
surfaceMask TextStudio.TextStudioSurfaceMask

Returns

System.Boolean

public int Count { get; }

Returns

System.Int32

public TextStudioGlyphAuthorityChannels Channels { get; }

Returns

TextStudio.TextStudioGlyphAuthorityChannels