如下圖,在Unity內是否有方法能將L_LegDn這個物件的"網格"範圍資訊提取出來,作使用?

    Related Discussions
    ...

    Aisha Unfortunately, our Unity expert, Harald, is on an urgent errand and will not be available, so an answer to this question may take a while. By the way, could you tell us what you need the mesh area for? Depending on the answer, what you want to do could easily be accomplished with existing components.

    @Aisha Sorry for the late reply! Unfortunately machine translation was not very clear. Could you please describe in more detail what exactly you mean by "網格 範"? Do you mean the surface area? Or do you mean the number of vertices of the mesh attachment? Or something else entirely?

    Could you perhaps please also describe what you are planning to do in general, then perhaps we might be able to better help.

      Harald
      是的,我指的是該圖片的面積範圍!
      我計畫讓該圖片的"面積"做為一個"button"讓玩家點擊,
      但我並不知道有沒有方法能在Unity內取得圖片的"面積範圍"資訊

      @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.