[Solved]
Hello
I have some GameObjects in my scene with static flag checked. Then I bake the scene (lightmap). The lightmap it is a requirement.
Well, these objects have to be placed at a random position , so, these objects can´t be batched before changing their position.
I turn off the static flag in order to avoid static batching for these objects, but when I build on iOS, t**he lighmap texture changes depending on camera distance** (only on the iDevice, not on Editor, not on win/mac player).
However, if i use StaticBatchingUtility.Combine after changing the position of objects, the lightmap texture is ok( it doesn´t change), but then I can´t change the position of the object again.
I tried to make a copy of this objects (Instantiate), change their position, Combine it (static batching), and when I need to move again, I make a copy (again) of the original objects, replace, Combine etc… But Instantiante method and Combine method are expensive on runtime.
Also I tryed to use the Instantiate methods and Combine methods on Start() (one method per object, a lot of objects), but on iPhone3GS the loading time is over 20 seconds per scene (this is a lot of time per scene).
My best option is replace the objects on runtime without Instantiate and Combine them (without static batching on runtime or build time), but then the lightmap texture changes depending on distance if I don´t do static batching to the objects. I´m using the Mobile/Unlit shader.
any suggestions??
How to avoid the change of the lightmap texture without static batching ?
Thanks in advance