Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dropdown interaction #1088

Open
wants to merge 2 commits into
base: develop
from

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.