*Notice. it may not fit with you’re case. i’m not a unity guy who has responsible for write right code for everyone. but you could get a idea from my solution. And sorry about my poor grammar, I’m not a native.
First of all, I’m tired with waiting a patch to solve this. This raycaster problem is existed since the first version of unity 5 until now. And It was too painful to hard-code workarounds case-by-case. So i finally open the ugui project which is open project at bitbucket. I changed just a line of code, and it worked nicely.
ps1. in my view, the evil of root for this problem is EventSystem.RaycastComparer() and Raycasters. if you face another raycast problems, take a look those classes.
ps2. if you’re facing a compile problem at editor when you try to bulid, restart your editor it’d resolve many issues.
Which issue exactly is this about? I’m in 5.2.1.f1 and still having issues with raycasters when used with world-space canvases and perspective cameras. I submitted a bug report with code to fix the issue (raycasters using Raycast instead of GetRayIntersection) a few weeks ago, but it was never turned into an Issue.