Selecting one MeshFilter in GameObject

Hello, I am currently trying to perfom following task - select one MeshFilter from GameObject(which has more than one MeshFilter inside) by clicking on it.

I am currently thinking about 2 different approaches. 1 - render each MeshFilter with separate color to texture and use it as lookup texture to get current mesh filter index. 2 - go through every triangle in mesh filter and check it for ray intersection.

First one looks easier to do, but maybe I am missing some even easier way of doing this?

P.S. I can’t use Mesh colliders because parts of model are to complex to fit 256 tris limit.

The 255 triangle limit only applies to convex MeshColliders, so you might still be able to use one for this.

Thx, I was wrong about 255 tris limit, I don’t need convex for this task. Anyway, I was able to implement color picking in about 50 lines of code, and it’s working quite good.