Skip to content

LedTextBasedDataSource

ClassLEDStudioLEDStudio
public abstract class LedTextBasedDataSource : LedDataSourceBase, ILedSource, ITextBlinkSource

Common base for text-based data source components that share appearance, font and scrolling settings. Derive from this instead of LEDStudio.LedDataSourceBase for any source backed by a LEDStudio.ITextStyledSource.

protected Color _textColor

Returns

UnityEngine.Color

protected Color _backgroundColor

Returns

UnityEngine.Color

protected TMP_FontAsset _fontAsset

Returns

TMPro.TMP_FontAsset

protected LedTextSettings _textSettings

Returns

LEDStudio.LedTextSettings

protected LedTextRenderBackendAsset _textRenderBackendAsset

Returns

LEDStudio.LedTextRenderBackendAsset

protected bool _autoScroll

Returns

System.Boolean

protected bool _alwaysScroll

Returns

System.Boolean

protected bool _seamlessWrap

Returns

System.Boolean

protected float _seamlessWrapPaddingPixels

Returns

System.Single

protected LedSeamlessWrapDistribution _seamlessWrapDistribution

Returns

LEDStudio.LedSeamlessWrapDistribution

protected LedTextScrollAxis _scrollAxis

Returns

LEDStudio.LedTextScrollAxis

protected float _scrollSpeed

Returns

System.Single

protected bool _enableScrollOffset

Returns

System.Boolean

protected float _scrollOffsetPercent

Returns

System.Single

protected LedTextBlinkSettings _blinkSettings

Returns

LEDStudio.LedTextBlinkSettings

protected abstract void CreateSource(Vector2Int targetResolution)

Create the concrete source. Called from LEDStudio.LedTextBasedDataSource.Prepare(UnityEngine.Vector2Int).

Parameters

Name Type
targetResolution UnityEngine.Vector2Int
protected abstract void UpdateSubclassProperties()

Push subclass-specific inspector changes during LEDStudio.LedTextBasedDataSource.UpdateSource(ImpossibleRobert.Common.Timing.TimeStep%40).

protected abstract void PushSubclassProperties()

Push all subclass-specific fields to the source (called from LEDStudio.LedTextBasedDataSource.OnValidate).

protected abstract void ReleaseSource()

Null out the concrete source reference (called from LEDStudio.LedTextBasedDataSource.Release).

protected LedTextSettings BuildTextSettings()

Builds normalized layout settings for the current text source.

Returns

LEDStudio.LedTextSettings

ConfigureTextStyle(Color?, LedTextSettings?, TMP_FontAsset, Color?, bool, bool, bool, float, LedSeamlessWrapDistribution, LedTextScrollAxis, float, bool, float, LedTextBlinkSettings?)

Section titled “ConfigureTextStyle(Color?, LedTextSettings?, TMP_FontAsset, Color?, bool, bool, bool, float, LedSeamlessWrapDistribution, LedTextScrollAxis, float, bool, float, LedTextBlinkSettings?)”
public void ConfigureTextStyle(Color? textColor = null, LedTextSettings? textSettings = null, TMP_FontAsset fontAsset = null, Color? backgroundColor = null, bool autoScroll = false, bool alwaysScroll = false, bool seamlessWrap = false, float seamlessWrapPaddingPixels = 8, LedSeamlessWrapDistribution seamlessWrapDistribution = LedSeamlessWrapDistribution.SingleRepeat, LedTextScrollAxis scrollAxis = LedTextScrollAxis.Horizontal, float scrollSpeed = 30, bool enableScrollOffset = false, float scrollOffsetPercent = 0, LedTextBlinkSettings? blinkSettings = null)

Replaces the source’s text appearance, scrolling, offset, and blinking configuration, then refreshes the owning board.

Parameters

Name Type Description
textColor System.Nullable{UnityEngine.Color} Foreground color, or null for white.
textSettings System.Nullable{LEDStudio.LedTextSettings} Text layout and renderer settings, or null for LED Studio defaults.
fontAsset TMPro.TMP_FontAsset Optional TextMesh Pro font used by font-backed rendering modes.
backgroundColor System.Nullable{UnityEngine.Color} Background color, or null for transparent.
autoScroll System.Boolean Whether overflowing content starts scrolling automatically.
alwaysScroll System.Boolean Whether content scrolls even when it already fits.
seamlessWrap System.Boolean Whether repeated content crosses the wrap boundary without a blank reset.
seamlessWrapPaddingPixels System.Single Gap between repeated copies in source pixels.
seamlessWrapDistribution LEDStudio.LedSeamlessWrapDistribution How repeated copies are distributed across the scroll cycle.
scrollAxis LEDStudio.LedTextScrollAxis Direction along which text moves.
scrollSpeed System.Single Signed scroll speed in source pixels per second.
enableScrollOffset System.Boolean Whether the explicit cycle offset is applied.
scrollOffsetPercent System.Single Initial position within the scroll cycle, from zero to 100.
blinkSettings System.Nullable{LEDStudio.LedTextBlinkSettings} Blink timing, or null to disable blinking with default timing.
public override sealed void Prepare(Vector2Int targetResolution)

Allocates or resizes source resources for the requested logical board resolution.

Parameters

Name Type
targetResolution UnityEngine.Vector2Int
public override sealed void UpdateSource(in TimeStep step)

Updates time-dependent content using the board’s deterministic simulation step.

Parameters

Name Type
step ImpossibleRobert.Common.Timing.TimeStep
public override sealed void MarkClean()

Clears dirty state after the compositor consumes the current output.

public override sealed void Release()

Releases textures and other resources owned by the source; repeated calls must be safe.

protected void MarkOwningBoardDirty()

Invalidates this source and its containing board so style or content changes are rendered on the next update.

protected LedTextBasedDataSource()

protected abstract ITextStyledSource StyledSource { get; }

The underlying text-styled source created by the subclass.

Returns

LEDStudio.ITextStyledSource

public LedTextBlinkSettings BlinkSettings { get; set; }

Returns

LEDStudio.LedTextBlinkSettings

public virtual bool RequiresTimeUpdates { get; }

Returns

System.Boolean

public LedTextRenderBackendAsset TextRenderBackendAsset { get; set; }

Returns

LEDStudio.LedTextRenderBackendAsset

public float ScrollSpeed { get; set; }

Returns

System.Single

public override sealed bool IsReady { get; }

Returns

System.Boolean

public override sealed bool IsDirty { get; }

Returns

System.Boolean

public override sealed Texture OutputTexture { get; }

Returns

UnityEngine.Texture