Ayfel / PrefabLightmapping

Script for saving lightmapping data to prefabs. Used through the Assets tab in Unity. Place your prefbas in the scene with this script at the root. Set up your lighting and in the editor go to Assets->Bake Prefab Lightmaps. After is processed you can now spawn your prefabs in different scenes and they will use the lightmapping from the original scene.
618 stars 88 forks source link

Baking lightmaps break decals until affected materials are Reimported. #49

Open PhillipGenant opened 2 years ago

PhillipGenant commented 2 years ago

I've had an issue where decals I'm using in my game wont appear on materials that are included in the prefab that is being baked.

I have a Video showing more of the effects of what I'm experiencing. Unity version and hdrp version included in video title.

Ayfel commented 2 years ago

What material is the decal? (shader) Also have you tried on a build?

PhillipGenant commented 2 years ago

I have tried on a build, the issue persists, and as there is no way to reimport or select the materials, the decals never display.

My decals look like this. Pretty standard stuff. When I remove the PrefabLightmapData component, delete the lightmap information and reimport the materials everything goes back to behaving how I had it before I started using prefab lightmap baking. image