Lightmaps in Unity 2D?

Hey. Just discovered that lightmap baking won’t work for Unity 2D sprites, only for meshes. Anyone know if there’s a way around this? Ideally a unity workaround, though if there’s a 3rd party asset out there I’d be willing to try it. My draw calls have gone a bit high for my liking, and most elements in the scene are static. Everything just has the one plain sprites/diffuse material.

I dont think the diffuse shader supports lightmaps?

You could try and create a mesh dynamically by ray-casting, which collides to the sprites,this mesh can have an additive shader which can mimic lighter areas, although this would not be a solution for shadows.

1 Like

Thought I’d email updates set for this thread, but guess not. Anyway, thanks for the replies.

Imaginaryhuman, it seems it’s the meshes themselves, or rather the lack of them for 2D sprites. Unity lightmapping only works on 3d meshes.

MarkD, might help, though sounds very complicated. I might continue on how I’m going at the moment and hopefully the draw calls won’t be an issue. I’m going to try and keep the game PC/console focused, so hopefully it’ll be fine. Averaging about 100 at the moment, without any optimisation. A about 30 of those are Unity GUI stuff I’ll be hoping to replace later.