• RuntimesUnity
  • When I click on a spine with the mouse, can I tell if it is clicked or not?

hello.

As the title says, is there any way to get the information of a spine when you click on it?

I am using a skeletonGraphic.

  • Misaki đã trả lời bài viết này.
    Related Discussions
    ...

    chashkim Since you said you are using "SkeletonGraphic", I assumed your question was probably related to the spine-unity runtime, so I changed the tag to Unity from Tutorials.

    You say you want to get information of a spine (perhaps spine skeleton?) when you click, but where do you mean when you click? If you click your skeleton GameObject in the scene window and make it selected, you should be able to find the SkeletonGraphic component section in the Inspector window, but what information do you want to see?

    • chashkim đã trả lời bài viết này.

      Misaki
      I apologize for not being more descriptive.

      The feature I'm looking for is when the game is in play.

      I was wondering if there is an OnClickEvent supported by SkeletonGraphic when you click on the part that corresponds to the character above the game scene.

      (like a UGUI Button)

      • Misaki đã trả lời bài viết này.

        chashkim I think what you want to do can be accomplished by adding the Event Trigger component: https://docs.unity3d.com/2018.4/Documentation/ScriptReference/EventSystems.EventTrigger.html

        You can see an example setup of using both SkeletonGraphic and Event Trigger components in Spine Examples/Other Examples/Outline Shaders example scene included in the spine-unity runtime:

        • chashkim đã trả lời bài viết này.
          21 ngày sau

          Misaki

          Thank you for your response.

          I will try that.