Loading Lightmap dynamically from hard drive

Hi Guys, is it possible to apply light map to object dynamically by loading it from a hard drive during runtime?

2 Answers

2

Yes indeed you can, I don’t really want to know if it’s this. But a solution is describe here :

I have tried it. when I bake my scene with the objects marked as static...the light map appears wierd...

–

do you have a screen ? And if you don't load them from your HDD but let Unity do it, does it work ?

–

Try this plugin...you can change properties of a shader on runtime like...Maintexture, Lightmap, Normalmap.... https://www.assetstore.unity3d.com/#/content/6617

–

hey guys, I found the answer…

see this
Gameobject xyz; //Assign this in the inspector

WWW wclass = new WWW(“file:///c:/abc.png”);
yield return wclass;
Texture2D img = wcalss.texture;
xyz.rendered.material.SetTexture(“_LightMap”,img);

//Done…This will work. Actually I am accessing the properties of the shader used…

please if your solution is the good one, validate your answer ;)

–