Skip to content

LedBoardElement

ClassLEDStudioLEDStudio
[UxmlElement]
public class LedBoardElement : VisualElement

UI Toolkit element that presents a live LED board output or standalone source texture, with optional scheduled refresh and hardware-style presentation rendering.

public LedBoardElement()

public void Bind(ILedBoardRuntime runtime)

Makes a runtime board authoritative for this element and switches presentation to the board’s composed output. Passing null clears the binding.

Parameters

Name Type
runtime LEDStudio.ILedBoardRuntime
public void Unbind()

Clears the runtime binding and returns the element to its static fallback texture.

public void SetSourceTexture(Texture texture)

Assigns a static fallback texture used only while no runtime board is bound.

Parameters

Name Type
texture UnityEngine.Texture
public void MarkDirty()

Forces the element to repaint its current presentation texture on the next UI update.

public void SetSource(LedSourceAsset source)

Forwards direct-source assignment to the bound board; ignored while unbound.

Parameters

Name Type
source LEDStudio.LedSourceAsset
public void SetComposition(LedCompositionAsset composition)

Forwards composition assignment to the bound board; ignored while unbound.

Parameters

Name Type
composition LEDStudio.LedCompositionAsset
public void SetProfile(LedBoardProfile profile)

Forwards authored profile assignment to the bound board; ignored while unbound.

Parameters

Name Type
profile LEDStudio.LedBoardProfile

SetInlineBoardSettings(Vector2Int, int, int)

Section titled “SetInlineBoardSettings(Vector2Int, int, int)”
public void SetInlineBoardSettings(Vector2Int logicalResolution, int cabinetColumns = 4, int cabinetRows = 1)

Configures logical resolution and cabinet counts on the bound board without creating a profile.

Parameters

Name Type
logicalResolution UnityEngine.Vector2Int
cabinetColumns System.Int32
cabinetRows System.Int32
public void SetInlineBoardDefinition(BoardDefinition definition)

Replaces the bound board’s complete inline physical and logical definition.

Parameters

Name Type
definition LEDStudio.BoardDefinition
public void SetPitch(LedPitchPreset pitch)

Sets inline physical pixel pitch on the bound board.

Parameters

Name Type
pitch LEDStudio.LedPitchPreset
public void SetAutoSizeFromPitch(bool value)

Enables or disables pitch-derived transform sizing on the bound board.

Parameters

Name Type
value System.Boolean
public void SetEmitter(LedEmitterParams emitter)

Sets inline emitter shape and response settings on the bound board.

Parameters

Name Type
emitter LEDStudio.LedEmitterParams
public void SetCabinetGrid(LedCabinetGrid cabinetGrid)

Sets inline cabinet layout and seam settings on the bound board.

Parameters

Name Type
cabinetGrid LEDStudio.LedCabinetGrid
public void SetDefaultReduction(LedReductionMode reductionMode)

Sets the bound board’s default source texture-reduction mode.

Parameters

Name Type
reductionMode LEDStudio.LedReductionMode
public void SetViewingDistances(float closeUpDistance, float farBlendDistance)

Sets close-up and far presentation distances, in world units, on the bound board.

Parameters

Name Type
closeUpDistance System.Single
farBlendDistance System.Single
public void SetQualityProfile(LedQualityProfile profile)

Applies an authored quality profile to the bound board.

Parameters

Name Type
profile LEDStudio.LedQualityProfile

SetInlineQualitySettings(int, float, LedReductionMode, bool, LedQualityLevel, bool, bool, LedQualityLevel, bool)

Section titled “SetInlineQualitySettings(int, float, LedReductionMode, bool, LedQualityLevel, bool, bool, LedQualityLevel, bool)”
public void SetInlineQualitySettings(int maxUpdatesPerFrame = 0, float targetUpdateRateHz = 0, LedReductionMode reductionOverride = LedReductionMode.Box, bool useReductionOverride = false, LedQualityLevel qualityLevel = LedQualityLevel.High, bool enableBloom = true, bool enableCloseUpMode = true, LedQualityLevel defectQuality = LedQualityLevel.High, bool enableTemporalDefects = true)

Replaces performance and fidelity settings on the bound board without creating a quality profile.

Parameters

Name Type
maxUpdatesPerFrame System.Int32
targetUpdateRateHz System.Single
reductionOverride LEDStudio.LedReductionMode
useReductionOverride System.Boolean
qualityLevel LEDStudio.LedQualityLevel
enableBloom System.Boolean
enableCloseUpMode System.Boolean
defectQuality LEDStudio.LedQualityLevel
enableTemporalDefects System.Boolean
public void SetBackgroundColor(Color color)

Sets the logical texture clear color on the bound board.

Parameters

Name Type
color UnityEngine.Color
public void SetPresentationBackgroundColor(Color color)

Sets the shader backplate color behind emitters on the bound board.

Parameters

Name Type
color UnityEngine.Color
public void SetTopologyAsset(LedTopologyAsset topologyAsset)

Applies a reusable topology asset and refreshes generated geometry on the bound board.

Parameters

Name Type
topologyAsset LEDStudio.LedTopologyAsset
public void SetTopologySettings(LedTopologySettings topologySettings)

Applies inline topology settings and refreshes generated geometry on the bound board.

Parameters

Name Type
topologySettings LEDStudio.LedTopologySettings

SetExtrusionSettings(LedBoardExtrusionSettings)

Section titled “SetExtrusionSettings(LedBoardExtrusionSettings)”
public void SetExtrusionSettings(LedBoardExtrusionSettings extrusionSettings)

Sets inline generated body depth and region settings on the bound board.

Parameters

Name Type
extrusionSettings LEDStudio.LedBoardExtrusionSettings

SetExtrusionMaterials(LedBoardExtrusionMaterialSettings)

Section titled “SetExtrusionMaterials(LedBoardExtrusionMaterialSettings)”
public void SetExtrusionMaterials(LedBoardExtrusionMaterialSettings extrusionMaterials)

Sets generated body material overrides on the bound board.

Parameters

Name Type
extrusionMaterials LEDStudio.LedBoardExtrusionMaterialSettings
public bool RefreshTopologyMesh(bool forceReplaceCustomMesh = false)

Regenerates topology owned by the bound board and preserves custom meshes unless replacement is forced.

Parameters

Name Type
forceReplaceCustomMesh System.Boolean

Returns

System.Boolean

public void ApplyPhysicalSize()

Applies pitch-derived physical dimensions to the bound board transform.

public void SetPlaylist(LedPlaylistAsset playlist)

Activates a playlist on the bound board from its first entry.

Parameters

Name Type
playlist LEDStudio.LedPlaylistAsset
public void ResetPlaylistPlayback()

Returns the bound board’s playlist to its first entry and zero elapsed time.

public void SetEmitterCount(int columns, int rows)

Changes the bound board’s emitter-grid resolution while preserving cabinet layout.

Parameters

Name Type
columns System.Int32
rows System.Int32
public void SetEmitterCount(Vector2Int emitterCount)

Changes the bound board’s emitter-grid resolution while preserving cabinet layout.

Parameters

Name Type
emitterCount UnityEngine.Vector2Int
public void SetEmitterDensity(float emittersPerUnit)

Derives the bound board’s emitter count from its local scale and a world-unit density.

Parameters

Name Type
emittersPerUnit System.Single
public void SetEmitterCountForSize(Vector2 size, float emittersPerUnit)

Derives the bound board’s emitter count from a supplied size and world-unit density.

Parameters

Name Type
size UnityEngine.Vector2
emittersPerUnit System.Single
public void SetLiveInput(string inputName, LedDataSourceBase sourceComponent)

Binds a named composition input on the bound board to a scene data source.

Parameters

Name Type
inputName System.String
sourceComponent LEDStudio.LedDataSourceBase
public void SetLiveInputTexture(string inputName, Texture texture)

Binds a named composition input on the bound board directly to a texture.

Parameters

Name Type
inputName System.String
texture UnityEngine.Texture
public void ClearLiveInput(string inputName)

Removes a named live-input binding from the bound board.

Parameters

Name Type
inputName System.String
public void SetScore(string home, string away, string period, string clock)

Pushes structured values to score sources discovered on the bound board.

Parameters

Name Type
home System.String
away System.String
period System.String
clock System.String
public void SetSourceText(string sourceId, string value)

Replaces text under a stable source ID on the bound board.

Parameters

Name Type
sourceId System.String
value System.String
public void SetSourceTexture(string sourceId, Texture texture)

Replaces a texture under a stable source ID on the bound board.

Parameters

Name Type
sourceId System.String
texture UnityEngine.Texture
public void MarkSourceDirty(string sourceId)

Schedules a full refresh for externally changed content on the bound board.

Parameters

Name Type
sourceId System.String
public void MarkSourceDirty(string sourceId, RectInt sourceRect)

Schedules a partial source-space refresh for externally changed content on the bound board.

Parameters

Name Type
sourceId System.String
sourceRect UnityEngine.RectInt
public void SetDefectEnabled(bool value)

Enables or bypasses all configured defect layers on the bound board.

Parameters

Name Type
value System.Boolean
public void SetSyncClock(double seconds)

Sets absolute playlist time in seconds on the bound board or its sync group.

Parameters

Name Type
seconds System.Double
public void SetSyncGroup(string syncGroupId)

Assigns the bound board to an explicit synchronization group.

Parameters

Name Type
syncGroupId System.String

AddImagePort(string, Texture2D, Rect?, LedFitMode, int)

Section titled “AddImagePort(string, Texture2D, Rect?, LedFitMode, int)”
public LedSourceAsset AddImagePort(string sourceId, Texture2D texture = null, Rect? zone = null, LedFitMode fitMode = LedFitMode.Fit, int priority = 0)

Adds a named texture-backed image layer to the bound board’s runtime composition.

Parameters

Name Type
sourceId System.String
texture UnityEngine.Texture2D
zone System.Nullable{UnityEngine.Rect}
fitMode LEDStudio.LedFitMode
priority System.Int32

Returns

LEDStudio.LedSourceAsset

AddRenderTexturePort(string, RenderTexture, Rect?, LedFitMode, int, UpdateScheduleSettings)

Section titled “AddRenderTexturePort(string, RenderTexture, Rect?, LedFitMode, int, UpdateScheduleSettings)”
public LedSourceAsset AddRenderTexturePort(string sourceId, RenderTexture renderTexture, Rect? zone = null, LedFitMode fitMode = LedFitMode.Stretch, int priority = 0, UpdateScheduleSettings updateSchedule = default)

Adds a named externally updated render-texture layer to the bound board.

Parameters

Name Type
sourceId System.String
renderTexture UnityEngine.RenderTexture
zone System.Nullable{UnityEngine.Rect}
fitMode LEDStudio.LedFitMode
priority System.Int32
updateSchedule ImpossibleRobert.Common.Timing.UpdateScheduleSettings

Returns

LEDStudio.LedSourceAsset

CreateDrawingPort(string, Vector2Int, Rect?, LedFitMode, int, RenderTextureFormat)

Section titled “CreateDrawingPort(string, Vector2Int, Rect?, LedFitMode, int, RenderTextureFormat)”
public RenderTexture CreateDrawingPort(string sourceId, Vector2Int renderResolution, Rect? zone = null, LedFitMode fitMode = LedFitMode.Stretch, int priority = 0, RenderTextureFormat format = RenderTextureFormat.ARGB32)

Creates a runtime-owned render texture and adds it as a named draw-anything layer.

Parameters

Name Type
sourceId System.String
renderResolution UnityEngine.Vector2Int
zone System.Nullable{UnityEngine.Rect}
fitMode LEDStudio.LedFitMode
priority System.Int32
format UnityEngine.RenderTextureFormat

Returns

UnityEngine.RenderTexture

AddUIToolkitPort(string, PanelSettings, Vector2Int?, Rect?, LedFitMode, int, UpdateScheduleSettings)

Section titled “AddUIToolkitPort(string, PanelSettings, Vector2Int?, Rect?, LedFitMode, int, UpdateScheduleSettings)”
public LedSourceAsset AddUIToolkitPort(string sourceId, PanelSettings panelSettings, Vector2Int? renderResolution = null, Rect? zone = null, LedFitMode fitMode = LedFitMode.Stretch, int priority = 0, UpdateScheduleSettings updateSchedule = default)

Adds a named UI Toolkit panel-settings source layer to the bound board.

Parameters

Name Type
sourceId System.String
panelSettings UnityEngine.UIElements.PanelSettings
renderResolution System.Nullable{UnityEngine.Vector2Int}
zone System.Nullable{UnityEngine.Rect}
fitMode LEDStudio.LedFitMode
priority System.Int32
updateSchedule ImpossibleRobert.Common.Timing.UpdateScheduleSettings

Returns

LEDStudio.LedSourceAsset

AddTextPort(string, string, Rect?, LedFitMode, int, Color?, float, TextAnchor, LedTextSizingMode, TMP_FontAsset, bool, float, float, bool, float, LedSeamlessWrapDistribution, LedTextScrollAxis)

Section titled “AddTextPort(string, string, Rect?, LedFitMode, int, Color?, float, TextAnchor, LedTextSizingMode, TMP_FontAsset, bool, float, float, bool, float, LedSeamlessWrapDistribution, LedTextScrollAxis)”
public LedSourceAsset AddTextPort(string sourceId, string text = "", Rect? zone = null, LedFitMode fitMode = LedFitMode.Fit, int priority = 0, Color? color = null, float textSize = 24, TextAnchor alignment = TextAnchor.MiddleCenter, LedTextSizingMode sizingMode = LedTextSizingMode.FitBox, TMP_FontAsset font = null, bool scroll = false, float scrollSpeed = 30, float scrollOffsetPercent = 0, bool seamlessWrap = false, float seamlessWrapPaddingPixels = 8, LedSeamlessWrapDistribution seamlessWrapDistribution = LedSeamlessWrapDistribution.SingleRepeat, LedTextScrollAxis scrollAxis = LedTextScrollAxis.Horizontal)

Adds a named text layer with shared sizing, scrolling, and seamless-wrap controls.

Parameters

Name Type
sourceId System.String
text System.String
zone System.Nullable{UnityEngine.Rect}
fitMode LEDStudio.LedFitMode
priority System.Int32
color System.Nullable{UnityEngine.Color}
textSize System.Single
alignment UnityEngine.TextAnchor
sizingMode LEDStudio.LedTextSizingMode
font TMPro.TMP_FontAsset
scroll System.Boolean
scrollSpeed System.Single
scrollOffsetPercent System.Single
seamlessWrap System.Boolean
seamlessWrapPaddingPixels System.Single
seamlessWrapDistribution LEDStudio.LedSeamlessWrapDistribution
scrollAxis LEDStudio.LedTextScrollAxis

Returns

LEDStudio.LedSourceAsset

AddTimerPort(string, float, bool, Rect?, LedFitMode, int, Color?, float, TextAnchor, LedTextSizingMode, TMP_FontAsset, bool, float, float, bool, float, LedSeamlessWrapDistribution, LedTextScrollAxis)

Section titled “AddTimerPort(string, float, bool, Rect?, LedFitMode, int, Color?, float, TextAnchor, LedTextSizingMode, TMP_FontAsset, bool, float, float, bool, float, LedSeamlessWrapDistribution, LedTextScrollAxis)”
public LedTimerDataSource AddTimerPort(string sourceId, float initialSeconds = 60, bool autoStart = false, Rect? zone = null, LedFitMode fitMode = LedFitMode.Fit, int priority = 0, Color? color = null, float textSize = 24, TextAnchor alignment = TextAnchor.MiddleCenter, LedTextSizingMode sizingMode = LedTextSizingMode.FitBox, TMP_FontAsset font = null, bool scroll = false, float scrollSpeed = 30, float scrollOffsetPercent = 0, bool seamlessWrap = false, float seamlessWrapPaddingPixels = 8, LedSeamlessWrapDistribution seamlessWrapDistribution = LedSeamlessWrapDistribution.SingleRepeat, LedTextScrollAxis scrollAxis = LedTextScrollAxis.Horizontal)

Adds a scene-backed countdown or count-up timer layer to the bound board.

Parameters

Name Type
sourceId System.String
initialSeconds System.Single
autoStart System.Boolean
zone System.Nullable{UnityEngine.Rect}
fitMode LEDStudio.LedFitMode
priority System.Int32
color System.Nullable{UnityEngine.Color}
textSize System.Single
alignment UnityEngine.TextAnchor
sizingMode LEDStudio.LedTextSizingMode
font TMPro.TMP_FontAsset
scroll System.Boolean
scrollSpeed System.Single
scrollOffsetPercent System.Single
seamlessWrap System.Boolean
seamlessWrapPaddingPixels System.Single
seamlessWrapDistribution LEDStudio.LedSeamlessWrapDistribution
scrollAxis LEDStudio.LedTextScrollAxis

Returns

LEDStudio.LedTimerDataSource

AddScorePort(string, string, string, string, string, string, string, Rect?, LedFitMode, int, Color?, float, TextAnchor, LedTextSizingMode, TMP_FontAsset, bool, float, float, bool, float, LedSeamlessWrapDistribution, LedTextScrollAxis)

Section titled “AddScorePort(string, string, string, string, string, string, string, Rect?, LedFitMode, int, Color?, float, TextAnchor, LedTextSizingMode, TMP_FontAsset, bool, float, float, bool, float, LedSeamlessWrapDistribution, LedTextScrollAxis)”
public LedScoreDataSource AddScorePort(string sourceId, string homeLabel = "HOME", string awayLabel = "AWAY", string homeScore = "0", string awayScore = "0", string period = "", string clock = "", Rect? zone = null, LedFitMode fitMode = LedFitMode.Fit, int priority = 0, Color? color = null, float textSize = 24, TextAnchor alignment = TextAnchor.MiddleCenter, LedTextSizingMode sizingMode = LedTextSizingMode.FitBox, TMP_FontAsset font = null, bool scroll = false, float scrollSpeed = 30, float scrollOffsetPercent = 0, bool seamlessWrap = false, float seamlessWrapPaddingPixels = 8, LedSeamlessWrapDistribution seamlessWrapDistribution = LedSeamlessWrapDistribution.SingleRepeat, LedTextScrollAxis scrollAxis = LedTextScrollAxis.Horizontal)

Adds a scene-backed scoreboard layer to the bound board.

Parameters

Name Type
sourceId System.String
homeLabel System.String
awayLabel System.String
homeScore System.String
awayScore System.String
period System.String
clock System.String
zone System.Nullable{UnityEngine.Rect}
fitMode LEDStudio.LedFitMode
priority System.Int32
color System.Nullable{UnityEngine.Color}
textSize System.Single
alignment UnityEngine.TextAnchor
sizingMode LEDStudio.LedTextSizingMode
font TMPro.TMP_FontAsset
scroll System.Boolean
scrollSpeed System.Single
scrollOffsetPercent System.Single
seamlessWrap System.Boolean
seamlessWrapPaddingPixels System.Single
seamlessWrapDistribution LEDStudio.LedSeamlessWrapDistribution
scrollAxis LEDStudio.LedTextScrollAxis

Returns

LEDStudio.LedScoreDataSource

AddCanvasPort(string, Camera, Vector2Int, Rect?, LedFitMode, int, UpdateScheduleSettings)

Section titled “AddCanvasPort(string, Camera, Vector2Int, Rect?, LedFitMode, int, UpdateScheduleSettings)”
public LedCanvasDataSource AddCanvasPort(string sourceId, Camera sourceCamera, Vector2Int renderResolution, Rect? zone = null, LedFitMode fitMode = LedFitMode.Stretch, int priority = 0, UpdateScheduleSettings updateSchedule = default)

Adds a scene-backed camera or Canvas capture layer to the bound board.

Parameters

Name Type
sourceId System.String
sourceCamera UnityEngine.Camera
renderResolution UnityEngine.Vector2Int
zone System.Nullable{UnityEngine.Rect}
fitMode LEDStudio.LedFitMode
priority System.Int32
updateSchedule ImpossibleRobert.Common.Timing.UpdateScheduleSettings

Returns

LEDStudio.LedCanvasDataSource

AddUIToolkitPort(string, UIDocument, Vector2Int, Rect?, LedFitMode, int, UpdateScheduleSettings)

Section titled “AddUIToolkitPort(string, UIDocument, Vector2Int, Rect?, LedFitMode, int, UpdateScheduleSettings)”
public LedUIToolkitDataSource AddUIToolkitPort(string sourceId, UIDocument document, Vector2Int renderResolution, Rect? zone = null, LedFitMode fitMode = LedFitMode.Stretch, int priority = 0, UpdateScheduleSettings updateSchedule = default)

Adds a scene-backed UI Toolkit document capture layer to the bound board.

Parameters

Name Type
sourceId System.String
document UnityEngine.UIElements.UIDocument
renderResolution UnityEngine.Vector2Int
zone System.Nullable{UnityEngine.Rect}
fitMode LEDStudio.LedFitMode
priority System.Int32
updateSchedule ImpossibleRobert.Common.Timing.UpdateScheduleSettings

Returns

LEDStudio.LedUIToolkitDataSource

AddVideoPort(string, VideoClip, Rect?, LedFitMode, int, bool, bool)

Section titled “AddVideoPort(string, VideoClip, Rect?, LedFitMode, int, bool, bool)”
public LedVideoDataSource AddVideoPort(string sourceId, VideoClip clip = null, Rect? zone = null, LedFitMode fitMode = LedFitMode.Fill, int priority = 0, bool playOnAwake = true, bool loop = true)

Adds a scene-backed video-player layer to the bound board.

Parameters

Name Type
sourceId System.String
clip UnityEngine.Video.VideoClip
zone System.Nullable{UnityEngine.Rect}
fitMode LEDStudio.LedFitMode
priority System.Int32
playOnAwake System.Boolean
loop System.Boolean

Returns

LEDStudio.LedVideoDataSource

AddSourcePort(string, LedSourceAsset, Rect?, LedFitMode, int, bool)

Section titled “AddSourcePort(string, LedSourceAsset, Rect?, LedFitMode, int, bool)”
public void AddSourcePort(string sourceId, LedSourceAsset source, Rect? zone = null, LedFitMode fitMode = LedFitMode.Fit, int priority = 0, bool preserveAlpha = false)

Adds a custom source asset under a stable ID to the bound board’s runtime composition.

Parameters

Name Type
sourceId System.String
source LEDStudio.LedSourceAsset
zone System.Nullable{UnityEngine.Rect}
fitMode LEDStudio.LedFitMode
priority System.Int32
preserveAlpha System.Boolean
public void RefreshSources()

Rediscovers component-backed sources after manual scene additions or removals.

public ILedBoardRuntime BoundRuntime { get; }

Returns

LEDStudio.ILedBoardRuntime

public Texture DisplayedTexture { get; }

Returns

UnityEngine.Texture

[UxmlAttribute("auto-refresh")]
[CreateProperty]
public bool AutoRefresh { get; set; }

Returns

System.Boolean

[UxmlAttribute("refresh-rate-hz")]
[CreateProperty]
public float RefreshRateHz { get; set; }

Returns

System.Single

[UxmlAttribute("scale-mode")]
[CreateProperty]
public ScaleMode ScaleMode { get; set; }

Returns

UnityEngine.ScaleMode

[UxmlAttribute("texture-mode")]
[CreateProperty]
public LedBoardElementTextureMode TextureMode { get; set; }

Returns

LEDStudio.LedBoardElementTextureMode

[UxmlAttribute("tint")]
[CreateProperty]
public Color Tint { get; set; }

Returns

UnityEngine.Color

[UxmlAttribute("show-placeholder")]
[CreateProperty]
public bool ShowPlaceholder { get; set; }

Returns

System.Boolean

[UxmlAttribute("placeholder-text")]
[CreateProperty]
public string PlaceholderText { get; set; }

Returns

System.String