Skip to content

LedScoreDataSource

ClassLEDStudioLEDStudio
public sealed class LedScoreDataSource : LedTextBasedDataSource, ILedSource, ITextBlinkSource

Displays a scoreboard on the LED board. Place on the same GameObject as LedBoardController or a child — it will be auto-discovered.

public void SetLabels(string homeLabel, string awayLabel)

Updates both team labels and invalidates the owning board for immediate recomposition.

Parameters

NameType
homeLabelSystem.String
awayLabelSystem.String

Remarks

Null labels fall back to HOME and AWAY.

public void SetScore(string home, string away, string period, string clock)

Updates the displayed scores, period, and clock as one board refresh.

Parameters

NameType
homeSystem.String
awaySystem.String
periodSystem.String
clockSystem.String

Remarks

Null scores become 0; null period and clock values become empty text.

protected override void CreateSource(Vector2Int targetResolution)

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

Parameters

NameType
targetResolutionUnityEngine.Vector2Int
protected override void UpdateSubclassProperties()

Push subclass-specific inspector changes during LedTextBasedDataSource.UpdateSource(in TimeStep).

protected override void PushSubclassProperties()

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

protected override void ReleaseSource()

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

public LedScoreDataSource()

public override LedSourceType SourceType { get; }

Returns

LEDStudio.LedSourceType

protected override ITextStyledSource StyledSource { get; }

The underlying text-styled source created by the subclass.

Returns

LEDStudio.ITextStyledSource