- Home /
Sharing materials in unity
Can someone tell me if there is any GameObject have X number of Children and each X have 2 same materials how to share those materials among the all X children? Lets say I have 10 Children of Gameobject1 each of which have 2 same materials. Now the draw calls will be 20 but I want them to be 2 by sharing these 2 materials among all ten children
thanks IA
Answer by robertbu · May 02, 2013 at 04:50 PM
Assuming you don't change the attributes of the materials (like color or texture) at runtime, and assuming the number of vertex attributes is below 900, the materials should be batched together. Click on Stats in the upper right corner of the game screen and check the number that are batched. More info on batching:
http://docs.unity3d.com/Documentation/Manual/DrawCallBatching.html
Your answer
![](https://koobas.hobune.stream/wayback/20220613101416im_/https://answers.unity.com/themes/thub/images/avi.jpg)