Skip to content

ILedTextRenderBackend

InterfaceLEDStudioLEDStudio
public interface ILedTextRenderBackend

Optional render backend for LEDStudio.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

Name Type
text System.String
treatAsMarkup System.Boolean
void SetColor(Color textColor)

Sets the foreground color used when rasterizing text.

Parameters

Name Type
textColor UnityEngine.Color
void SetBackgroundColor(Color backgroundColor)

Sets the background color and alpha written behind rasterized glyphs.

Parameters

Name Type
backgroundColor UnityEngine.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

Name Type
settings LEDStudio.LedTextSettings
fontAsset TMPro.TMP_FontAsset
void Prepare(Vector2Int targetResolution)

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

Parameters

Name Type
targetResolution UnityEngine.Vector2Int
void UpdateBackend(in TimeStep step)

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

Parameters

Name Type
step ImpossibleRobert.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

Name Type
bounds UnityEngine.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