LedTextBasedDataSource
[ExecuteAlways]public abstract class LedTextBasedDataSource : LedDataSourceBase, ILedSource, ITextBlinkSourceCommon 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.
Fields
Section titled “Fields”
_textColor
Section titled “_textColor”[Header("Appearance")][Tooltip("Text color used by this source before board brightness and material response are applied.")][SerializeField]protected Color _textColorReturns
UnityEngine.Color
_backgroundColor
Section titled “_backgroundColor”[Tooltip("Optional backing color drawn behind the measured text cells. Transparent leaves playlist content visible through glyph holes and spaces.")][SerializeField]protected Color _backgroundColorReturns
UnityEngine.Color
_fontAsset
Section titled “_fontAsset”[Header("Font")][Tooltip("TMP font used when Text Rendering / Render Mode is Font Texture")][SerializeField]protected TMP_FontAsset _fontAssetReturns
TMPro.TMP_FontAsset
_textSettings
Section titled “_textSettings”[Tooltip("Text sizing, alignment, wrapping and rasterization settings.")][SerializeField]protected LedTextSettings _textSettingsReturns
LEDStudio.LedTextSettings
_textRenderBackendAsset
Section titled “_textRenderBackendAsset”[Tooltip("Optional reusable renderer profile used by external text render modes such as UniText.")][SerializeField]protected LedTextRenderBackendAsset _textRenderBackendAssetReturns
LEDStudio.LedTextRenderBackendAsset
_autoScroll
Section titled “_autoScroll”[Header("Scrolling")][Tooltip("Automatically scroll text")][SerializeField]protected bool _autoScrollReturns
System.Boolean
_alwaysScroll
Section titled “_alwaysScroll”[Tooltip("Scroll even when text fits within the board width")][SerializeField]protected bool _alwaysScrollReturns
System.Boolean
_seamlessWrap
Section titled “_seamlessWrap”[Tooltip("When scrolling text leaves one edge, repeat it at the opposite edge instead of leaving an empty gap.")][SerializeField]protected bool _seamlessWrapReturns
System.Boolean
_seamlessWrapPaddingPixels
Section titled “_seamlessWrapPaddingPixels”[Tooltip("Minimum transparent gap in source pixels between seamless text repetitions.")][SerializeField][Range(0, 512)]protected float _seamlessWrapPaddingPixelsReturns
System.Single
_seamlessWrapDistribution
Section titled “_seamlessWrapDistribution”[Tooltip("Controls whether seamless text appears once or is evenly repeated across the output width.")][SerializeField]protected LedSeamlessWrapDistribution _seamlessWrapDistributionReturns
LEDStudio.LedSeamlessWrapDistribution
_scrollAxis
Section titled “_scrollAxis”[Tooltip("Axis used by automatic scrolling, manual scroll offset, and seamless wrap.")][SerializeField]protected LedTextScrollAxis _scrollAxisReturns
LEDStudio.LedTextScrollAxis
_scrollSpeed
Section titled “_scrollSpeed”[Tooltip("Scroll speed in pixels per second (negative values scroll in the opposite direction)")][SerializeField][Range(-200, 200)]protected float _scrollSpeedReturns
System.Single
_enableScrollOffset
Section titled “_enableScrollOffset”[Tooltip("Apply a custom starting position along the scrolling path. Disabled by default to avoid shifting existing text.")][SerializeField]protected bool _enableScrollOffsetReturns
System.Boolean
_scrollOffsetPercent
Section titled “_scrollOffsetPercent”[Tooltip("Initial position along the scrolling path. 0 starts at the beginning, 100 starts at the far end.")][SerializeField][Range(0, 100)]protected float _scrollOffsetPercentReturns
System.Single
_blinkSettings
Section titled “_blinkSettings”[Header("Blinking")][Tooltip("Timed text blinking settings.")][SerializeField]protected LedTextBlinkSettings _blinkSettingsReturns
LEDStudio.LedTextBlinkSettings
Methods
Section titled “Methods”
CreateSource(Vector2Int)
Section titled “CreateSource(Vector2Int)”protected abstract void CreateSource(Vector2Int targetResolution)Create the concrete source. Called from LEDStudio.LedTextBasedDataSource.Prepare(UnityEngine.Vector2Int).
Parameters
| Name | Type |
|---|---|
targetResolution |
UnityEngine.Vector2Int |
UpdateSubclassProperties()
Section titled “UpdateSubclassProperties()”protected abstract void UpdateSubclassProperties()Push subclass-specific inspector changes during LEDStudio.LedTextBasedDataSource.UpdateSource(ImpossibleRobert.Common.Timing.TimeStep%40).
PushSubclassProperties()
Section titled “PushSubclassProperties()”protected abstract void PushSubclassProperties()Push all subclass-specific fields to the source (called from LEDStudio.LedTextBasedDataSource.OnValidate).
ReleaseSource()
Section titled “ReleaseSource()”protected abstract void ReleaseSource()Null out the concrete source reference (called from LEDStudio.LedTextBasedDataSource.Release).
BuildTextSettings()
Section titled “BuildTextSettings()”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. |
Prepare(Vector2Int)
Section titled “Prepare(Vector2Int)”public override sealed void Prepare(Vector2Int targetResolution)Allocates or resizes source resources for the requested logical board resolution.
Parameters
| Name | Type |
|---|---|
targetResolution |
UnityEngine.Vector2Int |
UpdateSource(in TimeStep)
Section titled “UpdateSource(in TimeStep)”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 |
MarkClean()
Section titled “MarkClean()”public override sealed void MarkClean()Clears dirty state after the compositor consumes the current output.
Release()
Section titled “Release()”public override sealed void Release()Releases textures and other resources owned by the source; repeated calls must be safe.
MarkOwningBoardDirty()
Section titled “MarkOwningBoardDirty()”protected void MarkOwningBoardDirty()Invalidates this source and its containing board so style or content changes are rendered on the next update.
Constructors
Section titled “Constructors”
LedTextBasedDataSource()
Section titled “LedTextBasedDataSource()”protected LedTextBasedDataSource()Properties
Section titled “Properties”
StyledSource
Section titled “StyledSource”protected abstract ITextStyledSource StyledSource { get; }The underlying text-styled source created by the subclass.
Returns
LEDStudio.ITextStyledSource
BlinkSettings
Section titled “BlinkSettings”public LedTextBlinkSettings BlinkSettings { get; set; }Returns
LEDStudio.LedTextBlinkSettings
RequiresTimeUpdates
Section titled “RequiresTimeUpdates”public virtual bool RequiresTimeUpdates { get; }Returns
System.Boolean
TextRenderBackendAsset
Section titled “TextRenderBackendAsset”public LedTextRenderBackendAsset TextRenderBackendAsset { get; set; }Returns
LEDStudio.LedTextRenderBackendAsset
ScrollSpeed
Section titled “ScrollSpeed”public float ScrollSpeed { get; set; }Returns
System.Single
IsReady
Section titled “IsReady”public override sealed bool IsReady { get; }Returns
System.Boolean
IsDirty
Section titled “IsDirty”public override sealed bool IsDirty { get; }Returns
System.Boolean
OutputTexture
Section titled “OutputTexture”public override sealed Texture OutputTexture { get; }Returns
UnityEngine.Texture