Change Color = Too many Draw calls

Hi every one,

i’m making a bullet hell game, and i want to change the color of any single projectile, but if i leave them white, i get 1 draw call for all of them, if i change the color i get 1 draw call for each of them.

How can i change the color without calling a draw call?
The only idea i have is to create a texture atlas, put in there the different-colored images, and change it runtime, but it’s not an elegant solution in my opinion…

ok, ideas??

actually the solution you suggested is the best solution comes to my mind… i think most unity users do that to reduce draw calls…
Try having multiple bullet gameobjects using same texture , each bullet uses different portion of the texture…
then instantiate/pool the desired bullet that carries the color you want directly without material modification…
i think it’s better to do this, (am not sure yet) but i think altering materials in runtime may cause batching to break or something…

Another option would be to use vertex colors. You would need to code that and adjust the shaders to support them.