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.
624 stars 89 forks source link

Not working on the build #2

Closed htorrendell closed 5 years ago

htorrendell commented 5 years ago

Hey Ayfel,

Thanks for this amazing tool. In the editor this works great but on an actual build, the light data does not seem to apply correctly.

I've tested on Android and Windows without any luck. Also tried putting the light data inside Resources to make sure that the light data was bundled in the build.

Running on Unity 2018.2.20f1.

Any ideas?

Thanks.

Ayfel commented 5 years ago

Any errors in the log file? I will take a look on my end with that unity version and let you know what I find

htorrendell commented 5 years ago

Unfortunately no errors on the log file. Been trying out different Player Settings without any luck. Let me know if you have any insights.

Thanks!

Ayfel commented 5 years ago

Check your Graphic settings in Project Settings for shader stripping see if maybe lightmap shaders are being stripped

image

htorrendell commented 5 years ago

Awesome. Yes, this was the issue. Shader Stripping Lightmap Modes set to Automatic causes the issue. If you set this to Custom everything works perfectly.

Thanks for the help! Super appreciate it.

Might be a good idea to add this into the Readme.

:-)

Ayfel commented 5 years ago

Great! yes I might add that into the readme, thanks.