Skip to content

LayoutCompositor

ClassLEDStudioLEDStudio
public sealed class LayoutCompositor

Composes multiple source layers into a single logical board RenderTexture. Resolves layout zones, fit/fill modes, layer ordering, opacity, and safe-area margins. Works in two modes:

  • Layout mode — driven by a [LEDStudio.LedLayoutAsset](/tools/ledstudio/api/ledstudio-ledlayoutasset/). Layer properties (Zone, FitMode, Opacity, Priority) always win over the component's equivalents when a layer binds to a GameObject component via matching SourceId.
  • Components-only mode — no layout asset. Uses each [LEDStudio.LedDataSourceBase](/tools/ledstudio/api/ledstudio-leddatasourcebase/) component's Zone/FitMode/Opacity directly.

Compose(RenderTexture, LedCompositionAsset, IReadOnlyList, bool, IReadOnlyList, Color, LedReductionSettings)

Section titled “Compose(RenderTexture, LedCompositionAsset, IReadOnlyList, bool, IReadOnlyList, Color, LedReductionSettings)”
public void Compose(RenderTexture target, LedCompositionAsset composition, IReadOnlyList<ILedSource> sourcesByLayer, bool fullFrame, IReadOnlyList<RectInt> dirtyRects, Color backgroundColor = default, LedReductionSettings reductionSettings = default)

Composition-mode compose. Sources are index-aligned with the composition’s layer list and are resolved by LEDStudio.LedSourceManager.

Parameters

Name Type Description
target UnityEngine.RenderTexture
composition LEDStudio.LedCompositionAsset
sourcesByLayer System.Collections.Generic.IReadOnlyList{LEDStudio.ILedSource}
fullFrame System.Boolean
dirtyRects System.Collections.Generic.IReadOnlyList{UnityEngine.RectInt}
backgroundColor UnityEngine.Color
reductionSettings LEDStudio.LedReductionSettings

ComposeLayerRange(RenderTexture, LedCompositionAsset, IReadOnlyList, int, int, bool, IReadOnlyList, Color, LedReductionSettings, bool)

Section titled “ComposeLayerRange(RenderTexture, LedCompositionAsset, IReadOnlyList, int, int, bool, IReadOnlyList, Color, LedReductionSettings, bool)”
public void ComposeLayerRange(RenderTexture target, LedCompositionAsset composition, IReadOnlyList<ILedSource> sourcesByLayer, int firstLayer, int layerCount, bool fullFrame, IReadOnlyList<RectInt> dirtyRects, Color backgroundColor = default, LedReductionSettings reductionSettings = default, bool clearTarget = true)

No description is available for this member.

Parameters

Name Type Description
target UnityEngine.RenderTexture
composition LEDStudio.LedCompositionAsset
sourcesByLayer System.Collections.Generic.IReadOnlyList{LEDStudio.ILedSource}
firstLayer System.Int32
layerCount System.Int32
fullFrame System.Boolean
dirtyRects System.Collections.Generic.IReadOnlyList{UnityEngine.RectInt}
backgroundColor UnityEngine.Color
reductionSettings LEDStudio.LedReductionSettings
clearTarget System.Boolean

Compose(RenderTexture, LedLayoutAsset, IReadOnlyDictionary<string, ILedSource>, IReadOnlyList, bool, IReadOnlyList, Color, LedReductionSettings, string)

Section titled “Compose(RenderTexture, LedLayoutAsset, IReadOnlyDictionary<string, ILedSource>, IReadOnlyList, bool, IReadOnlyList, Color, LedReductionSettings, string)”
public void Compose(RenderTexture target, LedLayoutAsset layout, IReadOnlyDictionary<string, ILedSource> sourcesById, IReadOnlyList<ILedSource> unboundSources, bool fullFrame, IReadOnlyList<RectInt> dirtyRects, Color backgroundColor = default, LedReductionSettings reductionSettings = default, string activeStateId = "")

Layout-mode compose. Each LEDStudio.LedLayoutLayer is resolved to an LEDStudio.ILedSource via sourcesById (by SourceId). Layers without a matching source are skipped.

Parameters

Name Type Description
target UnityEngine.RenderTexture
layout LEDStudio.LedLayoutAsset
sourcesById System.Collections.Generic.IReadOnlyDictionary{System.String,LEDStudio.ILedSource}
unboundSources System.Collections.Generic.IReadOnlyList{LEDStudio.ILedSource}
fullFrame System.Boolean
dirtyRects System.Collections.Generic.IReadOnlyList{UnityEngine.RectInt}
backgroundColor UnityEngine.Color
reductionSettings LEDStudio.LedReductionSettings
activeStateId System.String

ComposeComponentsOnly(RenderTexture, IReadOnlyList, bool, Color, LedReductionSettings)

Section titled “ComposeComponentsOnly(RenderTexture, IReadOnlyList, bool, Color, LedReductionSettings)”
public void ComposeComponentsOnly(RenderTexture target, IReadOnlyList<ILedSource> sources, bool fullFrame, Color backgroundColor = default, LedReductionSettings reductionSettings = default)

Components-only compose. Each source’s own Zone/FitMode/Opacity is used. Sources are drawn in the priority order supplied by the caller; this method does not re-sort.

Parameters

Name Type Description
target UnityEngine.RenderTexture
sources System.Collections.Generic.IReadOnlyList{LEDStudio.ILedSource}
fullFrame System.Boolean
backgroundColor UnityEngine.Color
reductionSettings LEDStudio.LedReductionSettings

ComposeComponentsOnly(RenderTexture, IReadOnlyList, bool, IReadOnlyList, Color, LedReductionSettings)

Section titled “ComposeComponentsOnly(RenderTexture, IReadOnlyList, bool, IReadOnlyList, Color, LedReductionSettings)”
public void ComposeComponentsOnly(RenderTexture target, IReadOnlyList<ILedSource> sources, bool fullFrame, IReadOnlyList<RectInt> dirtyRects, Color backgroundColor = default, LedReductionSettings reductionSettings = default)

No description is available for this member.

Parameters

Name Type Description
target UnityEngine.RenderTexture
sources System.Collections.Generic.IReadOnlyList{LEDStudio.ILedSource}
fullFrame System.Boolean
dirtyRects System.Collections.Generic.IReadOnlyList{UnityEngine.RectInt}
backgroundColor UnityEngine.Color
reductionSettings LEDStudio.LedReductionSettings
public void ResetWarningCache()

No description is available for this member.

public void Release()

No description is available for this member.