I am baking my lightmap outside Unity and I am looking for how to apply it.
I read a post somewhere that said you could use all of the inbuilt shaders with a custom lightmap but it didn’t go into details on how this was accomplished.
I currently use a custom shader but there is an inbuilt shader that I would prefer to use.
Thank you.
Most of the built-in shaders will include lightmapping code, as will any custom surface shaders. To turn on the lightmapping code you need to setup lightmapping on your renderer objects in script. You can do this by setting the Renderer.lightmapIndex and the Renderer.lightmapTilingOffset fields. You will also need to populate the LightmapSettings.lightmaps array with your generated lightmaps.