unity5.6 DrawMeshInstanced(),how to set the different color for any instanced?

According api: DrawMeshInstanced(Mesh mesh, int submeshIndex, Material material, List matrices, MaterialPropertyBlock properties);how to set the MaterialPropertyBlock for per instanced?I think Maybe should be List ?

You assign only 1 MaterialPropertyBlock. if you want a per instance property you need to set this up in the shader and add the property as an array on the materialpropertyblock. 1 per instance.

3251322--250315--colorG.jpg 3251322--250314--noG.jpg [quote=“LennartJohansen, post:2, topic: 679625, username:LennartJohansen”]
You assign only 1 MaterialPropertyBlock. if you want a per instance property you need to set this up in the shader and add the property as an array on the materialpropertyblock. 1 per instance.
[/quote]
When use: Transform grassObj = GameObject.Instantiate(grassPrefab).transform;and change the color:

 MaterialPropertyBlock pb = new MaterialPropertyBlock();
            pb.SetColor("_Color", grassData.color);
            grass.GetComponent<MeshRenderer>().SetPropertyBlock(pb);

,but can not batching,what’s wrong?

OK,batching is working,but ,still have waring,maybe ignore it?