Skip to content

Conversation

Byakkl
Copy link

@Byakkl Byakkl commented Mar 12, 2020

This fix enables the PerformRaycast method to instead go through all TrackedDeviceRaycasters in order to get the correct element while respecting canvas sorting order.
The current method only returns the first hit from the first TrackedDeviceRaycaster preventing nested canvas components from returning the correct element being selected which causes dropdown menus to be unusable as they have their own canvas and TrackedDeviceRaycaster.

Checks to compare canvas sorting order, ensures that the closest element chosen is correct in the case of overlapping canvases. This would occur if a dropdown menu covers another UI element. GetComponentInParent on the raycast gameobject is required due to protection level of the canvas variable in TrackedDeviceRaycaster

This resolves issue #1087

@unity-cla-assistant
Copy link

unity-cla-assistant commented Jun 3, 2021

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ ekcoh
❌ Travis Milne


Travis Milne seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@jimon jimon requested a review from jamesmcgill February 13, 2023 14:05
@jfreire-unity jfreire-unity added the in-review Issues being reviewed by the Unity maintainers label Mar 3, 2023
@jfreire-unity jfreire-unity self-requested a review March 7, 2023 09:48
@jfreire-unity jfreire-unity removed their request for review December 20, 2024 08:38
@ekcoh
Copy link
Collaborator

ekcoh commented Oct 21, 2025

Updated branch with critical CI fix from develop. Hope it doesn't cause inconvenience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in-review Issues being reviewed by the Unity maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants