Unity-Technologies / EditorXR

Author XR in XR
Other
928 stars 166 forks source link

Fix bug blocking selection of SpatialMenu sub-menu elements with opposite hand #526

Closed dunity closed 5 years ago

dunity commented 5 years ago

Purpose of this PR

Fix bug blocking selection of SpatialMenu sub-menu elements with a node(proxy/controller) that wasn't the node that activated the menu

Testing status

Tested thoroughly. No new unidentified SpatialMenu bugs arose from these changes.

Technical risk

Low. The changes were relegated to a new parameter in the SelectCurrentlyHighlightedElement function, in SpatialMenuUI, informing the logic as to the calling node being the node that is currently owning SpatialInput (allowing for the bypass of specific ray-based processing that should only occur for the controlling node).

Comments to reviewers

Easiest repro, is trigger the Spatial Menu with one hand, then attempt to open a workspace, or add a tool, with the other hand. It wasn't working previously, now it is.