Skip to content

ILedTextRenderBackend

InterfaceLEDStudioLEDStudio
public interface ILedTextRenderBackend

Optional render backend for TextSource. Implementations can render rich text into a texture while LED Studio keeps source identity, board placement, scrolling, blinking, scheduling, and dirty propagation.

void SetText(string text, bool treatAsMarkup)

Replaces source text and controls whether supported markup is parsed or displayed literally.

Parameters

NameType
textSystem.String
treatAsMarkupSystem.Boolean
void SetColor(Color textColor)

Sets the foreground color used when rasterizing text.

Parameters

NameType
textColorUnityEngine.Color
void SetBackgroundColor(Color backgroundColor)

Sets the background color and alpha written behind rasterized glyphs.

Parameters

NameType
backgroundColorUnityEngine.Color

SetTextSettings(LedTextSettings, TMP_FontAsset)

Section titled “SetTextSettings(LedTextSettings, TMP_FontAsset)”
void SetTextSettings(LedTextSettings settings, TMP_FontAsset fontAsset)

Applies LED-owned layout settings and an optional TextMeshPro font asset.

Parameters

NameType
settingsLEDStudio.LedTextSettings
fontAssetTMPro.TMP_FontAsset
void Prepare(Vector2Int targetResolution)

Allocates or resizes backend resources for the requested LED source resolution.

Parameters

NameType
targetResolutionUnityEngine.Vector2Int
void UpdateBackend(in TimeStep step)

Advances animated text effects using the board’s deterministic simulation step.

Parameters

NameType
stepImpossibleRobert.Common.Timing.TimeStep
void MarkClean()

Clears dirty state after LED Studio consumes the current backend texture.

bool TryGetContentBounds(out RectInt bounds)

Returns the pixel bounds containing rendered text for fitting and scrolling calculations.

Parameters

NameType
boundsUnityEngine.RectInt

Returns

System.Boolean

void Release()

Releases textures, hidden objects, and other resources owned by the backend.

bool IsAvailable { get; }

Returns

System.Boolean

bool IsDirty { get; }

Returns

System.Boolean

bool RequiresTimeUpdates { get; }

Returns

System.Boolean

Texture OutputTexture { get; }

Returns

UnityEngine.Texture