Why is Unity using drawIndexedPrimitives incorrectly?

If you look in the screenshot, you can see what I mean. These meshes have the same index count as they do vertex count according to Xcode, but in Unity, they have way less (about 1/6 as many) indices as they do triangles.

So it seems that either Xcode is reporting wrong, or Unity is not correctly creating these meshes on iOS

@aleksandrk any thoughts here?

I’m not sure, what you mean by this :slight_smile:

What Xcode reports is (if we take #69 as an example) “take index buffer with pointer 0x10c21ca00, interpret data as 16-bit unsigned integers, use 1536 indices starting from offset 0, render distinct triangles; render 30 instances”. This will end up rendering a mesh with 512 triangles 30 times.

OOF haha, you are totally right! I misunderstood. thanks for the explanation :smile:

1 Like