Programming & Technical Aug 17, 2026

Unity Custom 2D Light - First Indie Triangle Provider Keep Hold 2026

Unity custom 2D light keep/hold - Light2DProvider triangle mesh, URP 2D, scale parameter, and KEEP sandbox vs HOLD ship after Unity 6.5.

By GamineAI Team

Unity Custom 2D Light - First Indie Triangle Provider Keep Hold 2026

Pixel art robot holding a glowing triangle lamp lighting a small sprite

If you searched unity custom 2d light after Unity 6.5’s 2D lighting APIs landed, you do not need another “URP is the future” pep talk. You need a keep/hold: can a small team inherit Light2DProvider, return a triangle mesh from GetMesh(), see the type in the Light 2D dropdown, tweak a serialized scale, and decide KEEP lab / HOLD ship rewrite before anyone builds a studio-wide custom lighting framework?

This URL owns that evening. It is not Unity Lighting Search (bulk-edit lights in complex scenes). It is not Unity 6.5 BIRP deprecation keep/hold (pipeline migration). It is custom URP 2D light shapes via Light2DProvider — the Manual’s triangle example as a falsifiable smoke.

Why this matters now

Unity 6.5’s What’s New / Discussions launch called out custom 2D lights and custom 2D shadows as headline 2D work: provider APIs so you are not stuck with stock Freeform / Sprite / Point shapes when art direction wants a wedge, cone silhouette, or tool-authored contour. The Manual page Create a custom 2D light type shows the exact contract: inherit Light2DProvider, implement ProviderName() and GetMesh(), optionally serialize fields that appear under a Provider section in the Inspector.

Mid-August 2026 still needs the keep/hold because Discord will jump from “custom lights exist” to “rewrite our entire 2D lighting stack this weekend.” Stock Light 2D types still ship most games. Custom providers are for shape gaps, not ego.

Why this URL wins the SERP gap: docs show the triangle; SERP lacks an indie G1–G6 KEEP/HOLD with honest Night B for shadows, batching notes, and CapEx language.

Who this is for

Reader Outcome tonight
Beginners Triangle light appears in Light Type dropdown and lights a sprite
Developers Provider lifecycle, mesh ownership, URP 2D prerequisites, failure modes
Creators Discord paste that kills framework FOMO
Companies CapEx four-liner — lab provider ≠ ship lighting rewrite
Search Primary keyword unity custom 2d light

Time: 60–90 minutes on a throwaway URP 2D scene.

Prerequisites: Unity 6.5+ with URP 2D Renderer, a disposable project or branch, and honesty that BIRP projects must migrate lighting before this API applies.

Plain vocabulary

Light2DProvider

Serializable base class in UnityEngine.Rendering.Universal for custom Light 2D types. You override ProviderName() (dropdown label) and GetMesh() (light volume shape). Documented on the URP Manual and Light2DProvider API.

Light Type → Provider

On a Light 2D component, choosing your provider type exposes serialized fields in a Provider Inspector section.

GetMesh()

Returns the mesh Unity uses to render the 2D light shape. Recalculate bounds/normals as in the Manual triangle sample.

Custom 2D shadow (Night B)

Separate API: ShadowShape2DProvider on Create a custom 2D shadow. Do not stack Night B into Night A receipt.

What this evening is not

Need Use this URL Use that instead
Bulk intensity edits across many lights No Lighting Search keep/hold
BIRP → URP migration No BIRP deprecation playbook
Mesh LOD import No Mesh LOD keep/hold
Custom 2D shadows Night B only Manual custom 2D shadow page
HDRP area lights No Wrong pipeline

Monday ritual (Discord-ready)

Unity custom 2D light keep/hold — Aug 17 2026
1) URP 2D throwaway scene + one sprite
2) MyTriangleLight : Light2DProvider (Manual sample)
3) Light Type → Triangle Light; scale smoke
4) Screenshot Provider section + Scene view
5) Decision: KEEP lab / HOLD ship lighting rewrite
Receipt: custom_2d_light_provider_receipt_v1.json
≠ Lighting Search · ≠ BIRP night · ≠ Shadow provider Night B

Manual triangle sample (verify against live docs)

Authoritative sample from Unity’s Manual (re-check namespaces/package versions on your editor):

using UnityEngine;
using UnityEngine.Rendering.Universal;

[System.Serializable]
public class MyTriangleLight : Light2DProvider
{
    public override GUIContent ProviderName() => new GUIContent("Triangle Light");

    [SerializeField] float scale = 0.5f;

    public override Mesh GetMesh()
    {
        Mesh triangleMesh = new Mesh
        {
            vertices = new[]
            {
                new Vector3(-scale, -scale, 0f),
                new Vector3(scale, -scale, 0f),
                new Vector3(scale, scale, 0f),
            },
            triangles = new[] { 0, 1, 2 }
        };
        triangleMesh.RecalculateBounds();
        triangleMesh.RecalculateNormals();
        return triangleMesh;
    }
}

Optional: override OnDrawGizmos for Scene-view clarity (Manual note).

G1–G6 keep/hold gates

G1 — Paste primary sources

  1. Open Create a custom 2D light type.
  2. Skim Unity 6.5 available 2D lights bullet.
  3. Paste into docs_paste_YYYY-MM-DD.md: ProviderName + GetMesh contract + package/URP version from Package Manager.

Pass: Paste with editor version string.
Fail: “I saw a Twitter GIF.”

G2 — Throwaway URP 2D scene

  1. New scene under Scenes/Spike/Custom2DLight.unity (never production hub).
  2. Confirm 2D Renderer asset assigned on URP.
  3. Place a Sprite Renderer with a bright albedo sprite / default square.
  4. Add one stock Light 2D (Point or Freeform) to prove baseline lighting works.

Pass: Sprite responds to stock Light 2D.
Fail: Unlit pink materials / wrong renderer — fix pipeline first.

G3 — Provider script compiles

  1. Add MyTriangleLight.cs (or your name) with Manual sample.
  2. Wait for script compile; fix missing URP assembly references if needed.
  3. Select Light 2D → Light Type list includes Triangle Light (or your ProviderName).

Pass: Type visible in dropdown.
Fail: Type missing — wrong assembly, non-serializable class, or not inheriting Light2DProvider.

G4 — Mesh + scale smoke

  1. Switch Light Type to your provider.
  2. Confirm Provider Inspector section shows scale.
  3. Change scale; observe light shape change in Scene/Game view.
  4. Move light; confirm sprite shading updates.

Pass: Scale visibly changes triangle footprint.
Fail: No visual change — mesh degenerate, scale too small, or light intensity zero.

G5 — Honesty limits

  1. Note target platform FPS with one custom light vs stock (mid-PC).
  2. Confirm you did not enable custom ShadowShape2DProvider tonight.
  3. Write one sentence: why stock Freeform was insufficient (or “exploration only”).

Pass: Limits logged on receipt.
Fail: “We’ll replace all lights tomorrow” without measurement.

G6 — KEEP / HOLD + receipt

Decision When
KEEP lab G1–G5 green; provider lives only on spike scene
HOLD ship Production lighting rewrite proposed without art brief
REWRITE later After promote_after + batching/perf review

Beginner path — first triangle light

  1. Use a URP 2D template project if you do not have one.
  2. Complete G2 with a stock light.
  3. Paste Manual triangle class; compile.
  4. Select Triangle Light; raise intensity until sprite reads.
  5. Stop. Do not author five providers tonight.

Common beginner mistakes:

  • Putting the script on a GameObject as a MonoBehaviour component (it is a provider type for Light 2D, not a separate behaviour you “Add Component” as the light itself — follow Manual selection flow).
  • Expecting HDRP 3D lights to appear.
  • Degenerate triangle (zero area) from scale 0.
  • Skipping RecalculateBounds.

Developer path — production-shaped honesty

When custom providers earn KEEP

Signal KEEP exploration HOLD rewrite
Art needs a shape stock types cannot approximate Yes
“Every light should be custom for brand” Yes HOLD
Tooling will generate meshes from SVG Later project Not Night A
Perf unknown on low-end mobiles Lab only Ship HOLD

Mesh ownership notes

  • Prefer simple meshes; avoid allocating new Mesh every frame without need — follow API expectations for your URP version (re-read Provider docs if GetMesh is called frequently).
  • If you cache meshes, document invalidation when serialized scale changes.
  • Index winding must be valid for the 2D light path.

Failure modes

Failure Symptom Fix
Missing type in dropdown Provider not discovered Serializable class, correct namespace, recompile
Pink / unlit Wrong renderer Assign URP 2D Renderer
No Provider section Wrong Light Type Select your provider type
Shape wrong Bad vertices Match Manual triangle; visualize gizmos
Ship FOMO All lights rewritten CapEx HOLD until art brief

Batching and perf (honest)

Unity documents 2D light batching optimizations separately. Night A only proves shape. Night C (optional) profiles batch breaks when many unique provider meshes exist. Do not claim “custom lights are free.”

Custom shadows Night B (do not merge)

Create a custom 2D shadow uses ShadowShape2DProvider with OnBeforeRender / NativeArrays. Schedule a separate evening. Mixing light + shadow providers on night one makes failures unfalsifiable.

CapEx four-liner

Claim: URP 2D Light2DProvider triangle smoke (Unity ____ / URP ____)
Lab: Triangle Light dropdown + scale PASS/FAIL
Ship lighting rewrite: HOLD until art shape brief + mid-PC FPS note
Owner: ________  promote_after: YYYY-MM-DD

Company diligence questions

  1. Are we on URP 2D or still BIRP for the 2D product?
  2. Which art shape requires a custom provider vs Freeform?
  3. Who owns mid-tier mobile FPS after N custom lights?
  4. Is ShadowShape2DProvider in scope this quarter?
  5. Did Lighting Search already solve the bulk-edit pain (different problem)?

Discord paste (creators)

Stop rewriting every 2D light this weekend.
Unity 6.5 Light2DProvider = custom shapes (Manual triangle).
Tonight: one spike scene, Triangle Light + scale, KEEP lab / HOLD ship.
≠ Lighting Search. ≠ BIRP migration. Receipt required.

Receipt schema

{
  "receipt_type": "custom_2d_light_provider_receipt_v1",
  "date": "YYYY-MM-DD",
  "unity_version": "6000.5.x",
  "urp_version": "",
  "docs_url": "https://docs.unity3d.com/6000.5/Documentation/Manual/urp/custom-2d-light.html",
  "provider_class": "MyTriangleLight",
  "dropdown_ok": true,
  "scale_smoke_ok": true,
  "shadow_provider_stacked": false,
  "decision": "KEEP_LAB",
  "owner": "name",
  "promote_after": null,
  "notes": "stock Freeform still default for ship"
}

End-to-end walkthrough (90 minutes)

Minute 0–15 — docs + project

Paste Manual. Confirm URP 2D. Create spike scene.

Minute 15–35 — baseline

Sprite + stock Light 2D. Screenshot baseline.

Minute 35–60 — provider

Add triangle class. Select Triangle Light. Scale 0.5 → 1.0 smoke.

Minute 60–75 — limits

Write “why Freeform insufficient” or “exploration only.” Confirm no shadow provider.

Minute 75–90 — receipt + Discord

File JSON. Post ritual. Close Editor.

Inspector checklist

  • [ ] Light Type shows custom name
  • [ ] Provider section visible
  • [ ] Intensity / color still work with provider
  • [ ] Blend styles / target sorting layers still coherent with your 2D setup
  • [ ] Gizmos optional but helpful

Art briefing template (before ship rewrite)

Shape needed: ________
Why Freeform fails: ________
Reference screenshot: ________
Max custom lights on screen: ________
Mobile FPS floor: ________
Owner: ________

Without this brief, HOLD rewrite.

Comparison — stock vs provider

Need Stock Light 2D Light2DProvider
Point / Freeform / Sprite shapes Yes Overkill
Exact wedge / tool mesh Limited Yes
Bulk edit many lights Use Lighting Search Still use Search on components
BIRP project N/A Migrate first

Week-two reinforcement

  1. Re-open Manual after URP package bumps.
  2. Profile 10 identical triangle lights vs 10 Freeform.
  3. Decide Night B shadows only if casters need custom outlines.
  4. Do not merge Mesh LOD or BIRP nights into this receipt.
  5. Keep Lighting Search for ops; providers for shape.

Tool ownership RACI

Concern Responsible Consulted
Docs paste Tech art lead Engineering
Provider code Engineering Tech art
Shape brief Art Design
Perf floor Engineering QA
Ship HOLD Producer Leadership

Buying nothing vs hiring a lighting TD

Night A is free Editor time. A lighting TD still needs the art brief and FPS floor. Paying for a “custom lighting framework” without G1–G6 is CapEx theater.

Promote checklist

  1. Provider only on scenes that need the shape.
  2. Default template lights remain stock.
  3. Mid-PC + one mobile FPS note attached.
  4. Feature flag or scene label spike/ until promote_after.
  5. Shadow provider explicitly out of scope or scheduled.

QuadLight vs TriangleLight (learning ladder)

The Manual also shows a minimal QuadLight stub with only ProviderName before GetMesh. Use that as a compile check if the full triangle fails. Ladder:

  1. Name-only provider appears in dropdown.
  2. Add GetMesh quad.
  3. Replace with triangle + scale.
  4. Only then consider SVG-import tooling.

Skipping the ladder is how teams ship empty ProviderName classes and blame Unity.

Scene-view gizmo hygiene

Override OnDrawGizmos to draw the triangle outline in yellow when the light is selected. Helps artists see shape without guessing from bloom. Keep gizmos cheap — no allocations in OnDrawGizmos beyond what Editor allows.

Sorting layers and target layers

Custom shape does not excuse wrong Target Sorting Layers. After the triangle appears, verify your sprite’s sorting layer is lit. Misconfigured layers look like “provider broken” when the mesh is fine.

Color and blend style smoke

Change light color to saturated red, then soft white. Confirm Provider mesh still reads. If blend style breaks only on provider types, file a package bug with version numbers — do not silently rewrite to stock without a receipt note.

Multiple providers in one project

You may register several provider classes. Night A ships one. A second provider is Night D after the first has a promote decision. Two unfinished providers double Discord confusion.

Prefab discipline

If you prefab a Light 2D with Triangle Light selected, document the dependency on MyTriangleLight.cs. Deleting the script breaks prefabs — treat provider scripts as public API for content.

CI / batchmode note

Headless builds should still compile provider scripts. Add a stub Editor test or RuntimeInitializeOnLoad log in spike only — never spam logs in ship builds. KEEP lab scripts behind #if DEVELOPMENT_BUILD only if you must; prefer spike assembly definition excluded from release.

Mobile thermal honesty

Wedge lights that cover half the screen can cost like large Freeform lights. Custom is not automatically cheaper. Your FPS note must include one handheld or low-end laptop pass before CapEx approval.

Assembly definition layout (tiny studio)

Suggested spike layout:

Assets/Spike/Custom2DLight/
  MyTriangleLight.cs
  Custom2DLight.unity
  README_RECEIPT.md

Optional: Spike.Custom2DLight.asmdef referencing URP assemblies so ship assemblies do not compile spike providers until you move the class. Moving without an asmdef is fine for Night A — document the path on the receipt.

Regression table (fill after scale smoke)

Check Stock Point Triangle Provider
Sprite lit
Color change
Intensity 0→2
Move light
Scale/param N/A
Mid-PC FPS

Empty cells mean you did not finish G4–G5.

Artist handoff one-pager

When KEEP lab promotes:

  1. Show dropdown name artists will see.
  2. Show which serialized fields they may touch.
  3. Ban “duplicate provider class per level.”
  4. Link Manual URL in Notion with paste date.

If artists ask for a second shape the same week, answer with the art briefing template — not a second unfinished provider class. One promoted triangle beats five abandoned experiments.

Package upgrade ritual

After any URP minor bump: open the custom light Manual page, recompile, re-select Triangle Light on the spike prefab, and append a line to the receipt notes (urp X.Y re-smoke PASS). Skipping this is how Provider dropdowns vanish after “routine” upgrades.

Search and snippet honesty

unity custom 2d light seekers want Light2DProvider + mesh steps. This page delivers Manual-aligned smoke and refuses rewrite FOMO. FAQ uses query phrasing.

Key takeaways

  1. Unity 6.5 URP exposes Light2DProvider for custom 2D light shapes (Manual).
  2. Implement ProviderName + GetMesh; serialized fields appear under Provider.
  3. Official triangle sample is enough for Night A smoke.
  4. Requires URP 2D — not BIRP, not a substitute for pipeline migration.
  5. KEEP lab / HOLD ship rewrite without an art shape brief.
  6. Custom shadows are Night B (ShadowShape2DProvider).
  7. Lighting Search solves bulk edit — different URL.
  8. Measure FPS before multiplying unique provider meshes.
  9. CapEx four-liner beats Discord framework FOMO.
  10. Receipt must record Unity/URP versions.
  11. Stock Freeform still ships most 2D games.
  12. Re-paste Manual after package upgrades.

FAQ

How do I create a unity custom 2d light?

Inherit Light2DProvider, implement ProviderName() and GetMesh(), then select the new type on a Light 2D component in a URP 2D project. Follow the Manual.

Does this work on the Built-In Render Pipeline?

No. This is URP 2D. Use the BIRP keep/hold if you still need migration planning.

Why is my provider missing from the dropdown?

Compile errors, missing URP references, or non-serializable provider class. Fix console errors first.

Can I edit many custom lights at once?

Use Lighting Search for bulk property edits — providers do not replace Search.

Should I replace all Point lights with providers?

No. Replace only where stock shapes fail the art brief.

What about custom 2D shadows?

Separate Manual page and evening — do not stack into this receipt.

Is Freeform enough for irregular shapes?

Often yes. Try Freeform before writing a provider. Document why Freeform failed if you KEEP a custom type.

What belongs in the receipt?

Docs URL, Unity/URP versions, provider class name, dropdown/scale smoke results, shadow-not-stacked, KEEP/HOLD, owner.

Related reading