@Aisha Thanks for the additional information.
In general we would recommend to create a normal Unity BoxCollider
or BoxCollider2D
GameObject and adjust the size accordingly. You can then attach a BoneFollower
component to the BoxCollider
GameObject to let the collider follow the respective bone.
Note that for user-interaction to feel right, it is likely better to make the "click-area" larger than the precise mesh shape, so that close misses don't feel like a bug. You can also check out this posting by Nate regarding collision boxes in Street Fighter for additional infomation.
If you really need to use a precise collision shape defined in the Spine Editor, you could create a Bounding Box Attachment and then in Unity use a BoundingBoxFollower
to create the respective collider. Note that while you could animate the shape of the Bounding Box Attachment, the collider shape in Unity will use only the first frame's shape, as it is very costly and rarely necessary to update the mesh collider shape every frame.