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.
645 stars 90 forks source link

Trying to set shader on a Material Variant #65

Closed BraveShundesign closed 8 months ago

BraveShundesign commented 8 months ago

I am using Unity 2022.3.14 URP rendering pipeline. There is no problem when running in the editor, but when I build, I get an error, Trying to set shader on a Material Variant., how should I solve it? Thanks

BraveShundesign commented 8 months ago

Snipaste_2024-02-01_01-21-08

Ayfel commented 8 months ago

There is a new bool in the script called "releaseShaders". Try to unselect it, that should fix that issue I believe.

BraveShundesign commented 8 months ago

脚本中有一个名为“releaseShaders”的新布尔值。尝试取消选择它,我相信这应该可以解决该问题。

Thank you so much for solving my problem, what a great resource otherwise my project wouldn't work, thanks again