Loosing batching! help

Hi!

I have been using static batching and it was working very good! But recently i wanted to add color or material of object to the list of materials used in a scene in order to make possible to restore it later (making object transparent then reverting back to the original state)…but when i do that i loose batching.

also i am succesfully changing color of material of batched object without loosing batch so i wonder what is going on with this.

unity asnwers cross post: http://answers.unity3d.com/questions/331431/loossing-batching-when-accessing-color-or-material.html

anybody had similiar problem?

any ideas how to save object material and not to loose batching in the process?
any help regarding this is appreciated!

ok figured this out… i was saving renderer.material and what i was suppose to do is to save renderer.sharedMaterial