Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Physics 2D Raycaster not working.

Discussion in '2D Experimental Preview' started by Uri_Popov, Nov 17, 2016.

  1. Uri_Popov

    Uri_Popov

    Joined:
    Aug 16, 2016
    Posts:
    3
    When interceptiong PointerEvents on game object with a 2d collider you need a Physics 2D raycaster on the main camera in the scene and a Events system object. I have both. It work for UI elements and 3d colliders( if I have a Physics Raycaster component) but not for 2d colliders. Unity version is 5.5.0a6 running on MacOS. Any way around this bug ?
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,487
    That's a bug in the UI system not the 2D physics system. It has been reported several times and has been fixed AFAIK. The issue was some internal reflection issue grabbing the 2D physics raycast function.

    Try using a version that isn't super old, we're currently at 5.5.0b11 which is a long way from 5.5.0a6. I have no idea if the bug was fixed there but it's a start.

    I do know for sure though that the issue was fixed.