Skip to content

LedDefectProfile

ClassLEDStudioLEDStudio
[CreateAssetMenu(fileName = "NewDefectProfile", menuName = "LED Studio/Defect Profile", order = 4)]
public sealed class LedDefectProfile : ScriptableObject

Reusable authored collection of LED defects that can be layered onto a board at runtime.

[Header("Global Settings")]
[Tooltip("Master seed for procedural defect generation")]
public int Seed

Returns

System.Int32

[Tooltip("Global intensity multiplier applied to all defect entries")]
[Range(0, 2)]
public float GlobalIntensityMultiplier

Returns

System.Single

[Header("Defect Entries")]
public List<LedDefectEntry> Entries

Returns

System.Collections.Generic.List{LEDStudio.LedDefectEntry}

[Header("Presets")]
[Tooltip("Optional imported defect mask texture (R=severity, G=mode, B=aux, A=timing)")]
public Texture2D ImportedMask

Returns

UnityEngine.Texture2D

public int EffectiveSeed(int boardInstanceId)

Combines the profile seed with a board instance ID so repeated profiles produce stable but distinct defect layouts.

Parameters

Name Type
boardInstanceId System.Int32

Returns

System.Int32

public static LedDefectProfile CreateNewBoard()

Creates a transient defect profile with all wear disabled for a clean, new-board appearance.

Returns

LEDStudio.LedDefectProfile

public static LedDefectProfile CreateLightWear(int seed = 18421)

Creates a transient profile with sparse dim, color-shifted, and flickering emitters.

Parameters

Name Type Description
seed System.Int32 Deterministic seed for selecting affected emitters.

Returns

LEDStudio.LedDefectProfile

public static LedDefectProfile CreateHeavyDamage(int seed = 90712)

Creates a transient profile with visibly dead, stuck, dim, and unstable emitters.

Parameters

Name Type Description
seed System.Int32 Deterministic seed for selecting affected emitters.

Returns

LEDStudio.LedDefectProfile

public LedDefectProfile()