- Home /
Answer by green_core · Jan 17, 2012 at 06:39 AM
Yes, it is. To load lightmaps on the fly you should load them to lightmaps array. Of course you should bake and save them before (to resources or to asset bundle, for instance).
Keep in mind, that each lightmap is an atlas. So, to apply two different sets of lightmaps properly you should bake them with lock atlas option. Instead that, you can save index and offset of each object and load them later, but i think it is not optimal solution.
Answer by Vicas · Dec 20, 2013 at 02:09 PM
Check out http://wiki.unity3d.com/index.php/LightMapSwitcher :)
That's for dual lightmaps. How would the script change for directional lightmaps?
You simply don't pull anything over to the "Near" slots in the Inspector. :-)
@Vicas, how would one go about implementing that LightmapSwitcher script? I have been fiddling around with it for a couple of hours but my program$$anonymous$$g/scripting language is very poor :') Haven't been able to get it to work yet.
Seeing its use of "Void" for its functions I would assume it is C#? Also, what is the NaturalSortComparer script that's also listed on that page for? I am using Unity pro 4.5, hope you see this!
$$anonymous$$y apologies if this is not the way to go but I strongly believe that script does what I'm looking for in my project.
works great with unity 4.6 but how should i made this works with unity 5 ?