- Home /
Cant dynamic batch because objects have different materials
Hello! My dynamic batching does not work throwing the error that objects have different materials. My objects have the same materials though (sprite-default) they have about 6 verts each. They also placed closed together, they are not marked as static. The problem started when i changed the material of the objects from the editor to test something but i reverted the changes, since then the materials in runtime are shown as (instance) and the problem with batching started. Ive tried backing up my project as well as deleting all the folder except the assets and project settings with no avail. Am sorry for my bad grammar english is not my native language. Please help thanks in advance.
Answer by SDriver · May 05, 2020 at 01:53 PM
Select the object that has the "(Instance)" material, and you should be able to reassign it to use the base material again. Just click that circle icon and it'll give you a list of all available materials.
The window listing materials will probably start off showing just those in the scene, which may be none. Click the "Assets" tab at the top and that should reveal the Sprites-Default material you want.
For future reference when you need to change some attributes of a material it's good to use a MaterialPropertyBlock
, that lets you change things for just one Renderer without creating an instance of the material.
Your answer
![](https://koobas.hobune.stream/wayback/20220612233328im_/https://answers.unity.com/themes/thub/images/avi.jpg)