Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Get Click event on elements inside canvas

Discussion in 'Editor & General Support' started by bhupi, Jun 3, 2015.

  1. bhupi

    bhupi

    Joined:
    May 6, 2015
    Posts:
    11
    I am working on unity project which has a 3d sphere(Rotatable and zoomable ) Inside that sphere there are 121 Quads(Tiles). Sphere is visible like google earth and inside a Canvas .I want to get Click events on Quads so that i can know on which Quad user has clicked and app can perform action according to that.

    I am trying to achieve this from past two days but not able to get click event on Quads. Is their any way to do this. I have heard that Canvas is just like a Bitmap Image.

    I have attached image of Sphere Design , it can be rotated and zoomable
     

    Attached Files:

    Last edited: Jun 3, 2015
  2. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    Um, Canvas is a 2d element. Not sure I completely understand your design. Can't you raycast through the click and see which quad is hit?
     
  3. bhupi

    bhupi

    Joined:
    May 6, 2015
    Posts:
    11
    Hi I have added Sphere design.