Hey,
We used to have an effect on our enemies when they got hit, that was done with the _FillColor, which is nice as you can have values higher than rgba(1,1,1,1). But as modifying the shader values broke the batching that wasn't ideal. Then I read that you can just change the vertex colors and that won't break batching (http://esotericsoftware.com/spine-unity#Changing-Materials-Per-Instance)
However it still seems to break batching. The only thing I do now, is when an enemy get hit I do the following:
skeleton_animation.Skeleton.R = 1f;
skeleton_animation.Skeleton.G = 0.2f;
skeleton_animation.Skeleton.B = 0.2f;
skeleton_animation.Skeleton.A = 1f;
As soon as that's called, the material is changed from "enemies_Material" to "enemies_Material (instance)" so I unity creates a clone of the material and breaks batching.
What might I be doing wrong? Thanks a lot!
Edit: Hmm I switched to Unity's normal sprite shader and it seems to work again. Does that make sense?
Niklas