Grouping vertexes using bones

I have a mesh that I want to change using a script during runtime. But I only want to change certain vertexes in the mesh. In Blender these vertexes form a vertex group but you don’t see this in Unity. Therefor I added a bone for each group and connected these with the vertex group giving them weight 1.

My idea was to find the correct groups in Unity by looping through Mesh.boneWeights and seeing if the weight to a certain bone was equal to 1. But how do I find out which bone index corresponds to which bone?

You shouldn’t look for a certain weight. Just search the bone Transform by name. If you found your bone GameObject you can search for it in the bones array. When you’ve found your bone you have the index. Now you can check the boneWeights array and find all vertices that have your bone index and a weight > 0.