is it best to try to combine multiple meshes throughout your scene or does unity already do this for objects with the same material? for example, say I have 3 tables with 6 computers on them, all induvial objects have their own collider. would it be beneficial to go through and combine the objects to one and make one mesh collider? same goes for a wall or a fence? i understand for a fence you would lose the occlusion calculations feature right as it would be one mesh and you wouldn’t want the entire thing to disappear as you move around the scene ( which would be better). fyi all these objects would be marked as static. thanks
No. Not unless you have GPU instancing enabled which requires some effort on your part.
This is why “mesh combine” assets exist respectively the corresponding API that these tools are built upon.
Unity 6 alleviates some of that pressure to combine meshes through its GPU resident drawer.
Mesh colliders are generally bad for performance. More so the more complex it is. I wager that having hundreds of individual colliders will be far more efficient than a single big mesh colliders simply due to the fact that all collisions will have to walk through the entire collider mesh to test for collisions rather than just a few with each having far fewer triangles.
Eg fence: this should NEVER be a mesh collider. A box collider absolutely suffices and is a lot faster, even if you need to create ten of these to match a fence’s curvature.
But above all else: profile. If you don’t have any performance issues and you don’t even know what’s taking how long there is little point in optimizing.