Issues with URP 2D Lights editor vs standalone

Edit: solved. Edgar (the procedural generator asset) required a Tilemap Material in its post-processing settings. After adding that, it all works fine.

Hi all,

I’m using Unity 2022.2.6f1 with URP 14.0.6.
I am trying to light my game using the Light2D component and have been having issues when building the game as standalone.

In the editor, lighting seems to work great. I turned off my global light to make it more obvious what my problem is, but here is an image of my game in the editor. The level itself is only lit by the 2D spot lights i’ve placed.

When built as a standalone, here is what the level looks like. The sprites are being affected by the spotlights but the level itself is not.

I’ve read about 50+ posts on unity/reddit/etc and have tried almost everything to fix the issue but can’t make anything work. I’m hoping someone can have a look at how my game is setup and see what’s wrong.

My levels are created at runtime based on a level graph and are made of tilemaps which are also combined at runtime.

Here are the light’s settings:

Here are 2D URP settings:

And some other settings:

I’m completely stumped and would appreciate any help.

This sounds like a hellish problem.

Two long-shots to try: (1) global light enabled but black, or other colors to see if it’s light texture generation or not, (2) remove Fog Of War Renderer Feature.

Also, what appears in the Frame Debugger for the light textures? The lights write onto the light texture(s) - do these appear correct in both editor and build? Finally in Frame Debugger, if you peak at the light textures referenced by the other materials (like when drawing SpriteRenderer/TilemapRenderer), are these correct or in build is it giving you a white texture?

I’ve actually just solved it and it was because you mentioned the Fog Of War feature. It wasn’t fog of war, but the asset it is a part of (Edgar) asks for a tilemap material in its post-processing settings that i never set (i assumed setting the material in the tilemap itself would do the same).

Thank you!