Mesh filter and mesh renderer. Why 2 components?

Hi. I am quite experienced with Unity and this question didn’t pop into my head until now. I notice that there are 2 components for rendering a mesh which need each other to render, mesh filter and mesh renderer. Why didn’t unity just include the mesh data in the mesh renderer itself? (Like in the case of skinned mesh renderer). Does it have some special purpose that I am not aware of or was it a bad design decision taken in the early days?

Well, it’s questionable if something is “bad design”. In a component based system it’s common to seperate concepts into seperate components. At the moment the MeshFilter doesn’t have many other uses besides being a Mesh-provider for a MeshRenderer. Though the only additional “feature” is when you have a MeshFilter attached with a referenced Mesh, when you add a MeshCollider to the gameobject it automatically takes that mesh reference. This does not happen with the SkinnedMesh renderer. Mainly because it’s usually pointless to have a MeshCollider on a skinned mesh as the collider mesh is not skinned anyways.

Maybe they thought about to add more features to it but that never happend. Btw: the components don’t need each other, only the MeshRenderer needs a MeshFilter, not the other way round. My guess it that they might have intended to provide a similar “modifier stack” as some modelling tools provide. Basically the same way how AudioFilters stack now. However as mentioned that never happend ^^.

I actually was already wondering why all those years almost nobody asked about this ^^.