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
  4. Dismiss Notice

HELP! IPointerClickHandler event;How to set the hierarchy?

Discussion in '2D' started by AkemiHomuraLove, Aug 16, 2020.

  1. AkemiHomuraLove

    AkemiHomuraLove

    Joined:
    Aug 16, 2020
    Posts:
    3
    I created two tilemap and one sprite,all implement IPointerClickHandler,
    1. tilemap: poistion.z=4,order in layer = 5
    2. sprite: poistion.z=0,order in layer = 8
    3. tilemap: poistion.z=-1,order in layer = 11

    Now,I click on the overlap of sprite and tilemap,Each time the event of the sprite;
    If you click the non sprite position,It's based on poistion.z trigger event;
    What should I do?
     
  2. AkemiHomuraLove

    AkemiHomuraLove

    Joined:
    Aug 16, 2020
    Posts:
    3
    In addition, unity version is 2019.4.2f1
     
  3. AkemiHomuraLove

    AkemiHomuraLove

    Joined:
    Aug 16, 2020
    Posts:
    3
    To sum up, I have a tilemap above the sprite, and I can't click the tilemap in the overlapping area;