Setup bones on cloth sim so that you can transfer it to Unity via FBX export
Without edit bones.



Edit bones can be a little tricky, in script below instead have added the default single bone object, copied it to match number of verts, joined and constrained to the empties. 

IMO this is a little easier to use for something like this and avoids dicking around with edit mode and heads and tails.


Select a mesh object in object mode. Run Script.
Adds an empty vertex-parented to each vertex.
Empties added to a collection and linked to scene.
Add a single bone armature using the operator.
Make a copy, select and link to scene for each other vertex.
Join to original.
For each pose bone, constrain to each empty.
Make the constrained pose the rest pose. (Else all bones are Y up at origin)


Test script.

import bpy

context = bpy.context
scene = context.scene
ob = context.object
me = ob.data

mtcol = bpy.data.collections.new("Empties")
scene.collection.children.link(mtcol)

for v in me.vertices:
    mt = bpy.data.objects.new(f"Vert {v.index}", None)
    mtcol.objects.link(mt)
    mt.parent = ob
    mt.parent_type = 'VERTEX'
    mt.parent_vertices = [v.index] * 3

# add an armature
bpy.ops.object.armature_add(location=(0, 0, 0))
for i in range(len(me.vertices) - 1):
    ob = context.object.copy()
    ob.data = ob.data.copy()
    scene.collection.objects.link(ob)
    ob.select_set(True)

bpy.ops.object.join()
arm = context.object

for pb, mt in zip(arm.pose.bones, mtcol.objects):
    con = pb.constraints.new('COPY_LOCATION')
    con.target = mt


# set constrained pose as rest.
bpy.ops.object.mode_set(mode='POSE')
bpy.ops.pose.armature_apply()


Can a punishment be implemented for using the word &quot;vertice&quot; in a Q/A?