Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question EventTrigger in SpriteRenderer doesn't get triggered.

Discussion in 'Input System' started by bawenang, Nov 14, 2022.

  1. bawenang

    bawenang

    Joined:
    Aug 18, 2012
    Posts:
    119
    Hi,
    I'm using an EventTrigger to trigger a SpriteRenderer object in the world map. I set it up like this:

    Screen Shot 2022-11-14 at 10.33.43.png

    I've also added the Physics 2D Raycaster on the Camera.

    Screen Shot 2022-11-14 at 10.33.54.png

    But it didn't get triggered. What did I do wrong here? Or is it even possible to do it with SpriteRenderer instead of Image / RawImage from the UI?

    Thanks.