How can access a Lightmap file using unityengine.resourse?

I need to switch Lightmaps at runtime and trying to access lightmap file which is placed in asset folder. Please help how can I access lightmap file using js.

First of all, you need to put your lightmaps in the resources folder otherwise your Resouces.Load never work on them.

When you put your lightmaps in it you can do somehting like this :

It’s a previous answer to the same question than you. I let you translate it in js ;). I don’t think it’s really complicated ^^