LedDataSourceBase
public abstract class LedDataSourceBase : MonoBehaviour, ILedSourceBase class for data source components that sit alongside a LEDStudio.LedBoardController and automatically feed content into the board. Add one of the concrete subclasses (LedTextDataSource, LedImageDataSource, LedVideoDataSource, LedRenderTextureDataSource, LedTimerDataSource, LedScoreDataSource) to the same GameObject or a child, and it will be discovered automatically — no manual wiring needed.
Methods
Section titled “Methods”
ConfigureRuntimeLayer(string, Rect?, LedFitMode, int, float, string, UpdateScheduleSettings)
Section titled “ConfigureRuntimeLayer(string, Rect?, LedFitMode, int, float, string, UpdateScheduleSettings)”public void ConfigureRuntimeLayer(string sourceId, Rect? zone = null, LedFitMode fitMode = LedFitMode.Fit, int priority = 0, float opacity = 1, string layerName = null, UpdateScheduleSettings updateSchedule = default)Configures this component as a runtime composition layer and invalidates its current output.
Parameters
| Name | Type | Description |
|---|---|---|
sourceId |
System.String | Stable ID used to address and bind the source. An empty value preserves the current ID. |
zone |
System.Nullable{UnityEngine.Rect} | Normalized board region occupied by the layer, or null for the full board. |
fitMode |
LEDStudio.LedFitMode | How source pixels are fitted into the layer’s zone. |
priority |
System.Int32 | Composition order relative to other layers. |
opacity |
System.Single | Layer opacity in the range from zero to one. |
layerName |
System.String | Optional display name. An empty value preserves the current name. |
updateSchedule |
ImpossibleRobert.Common.Timing.UpdateScheduleSettings | Schedule that controls when the source produces new frames. |
Prepare(Vector2Int)
Section titled “Prepare(Vector2Int)”public abstract 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 abstract 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 abstract void MarkClean()Clears dirty state after the compositor consumes the current output.
GetDirtyRects(List)
Section titled “GetDirtyRects(List)”public virtual void GetDirtyRects(List<RectInt> outRects)Appends source-space rectangles that changed since the last clean frame.
Parameters
| Name | Type |
|---|---|
outRects |
System.Collections.Generic.List{UnityEngine.RectInt} |
Release()
Section titled “Release()”public virtual void Release()Releases textures and other resources owned by the source; repeated calls must be safe.
Constructors
Section titled “Constructors”
LedDataSourceBase()
Section titled “LedDataSourceBase()”protected LedDataSourceBase()Properties
Section titled “Properties”
SourceId
Section titled “SourceId”public string SourceId { get; }Returns
System.String
LayerName
Section titled “LayerName”public string LayerName { get; }Returns
System.String
Priority
Section titled “Priority”public int Priority { get; }Returns
System.Int32
Opacity
Section titled “Opacity”public float Opacity { get; }Returns
System.Single
FitMode
Section titled “FitMode”public LedFitMode FitMode { get; }Returns
LEDStudio.LedFitMode
public Rect Zone { get; }Returns
UnityEngine.Rect
UpdateSchedule
Section titled “UpdateSchedule”public UpdateScheduleSettings UpdateSchedule { get; }Returns
ImpossibleRobert.Common.Timing.UpdateScheduleSettings
SourceType
Section titled “SourceType”public abstract LedSourceType SourceType { get; }Returns
LEDStudio.LedSourceType
IsReady
Section titled “IsReady”public abstract bool IsReady { get; }Returns
System.Boolean
IsDirty
Section titled “IsDirty”public abstract bool IsDirty { get; }Returns
System.Boolean
OutputTexture
Section titled “OutputTexture”public abstract Texture OutputTexture { get; }Returns
UnityEngine.Texture