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

Added interactor list scrolling to MRTK3 (experimental) #11642

Merged

Conversation

AMollis
Copy link
Member

@AMollis AMollis commented Jun 22, 2023

Overview

This adds an experimental method of scrolling through a Unity ScrollRect using XRI interactors. The sample scene demonstrates how to scroll through a canvas SrollRect using both the poke and hand ray interactors.

An animated image demonstrating scrolling with Unity XRI interactors

To accomplish this, the new experimental component InteractableEventRouter was added. The InteractableEventRouter component routes child XRI events to other child and parent game objects that contain the IXRInteractableEventRouteTarget component.

The following image shows a sample usage of this component. In this usage, the InteractableEventRouter is configured to bubble up select and hover events from child games objects.

Shows a sample usage of this component.  In this usage, the InteractableEventRouter is configured to bubble up select and hover events from child games objects

Fixes

Known Limitations

The InteractbleEventRouter currently can't handle IXRInteractableEventRouteTargets being dynamically added. So, this may limit some use cases, such as wanting to trickle down events to children added dynamically.

Verification

  • Unit Tests in progress

@AMollis AMollis requested a review from shaynie as a code owner June 22, 2023 21:44
@github-actions github-actions bot added the MRTK3 label Jun 22, 2023
@AMollis AMollis dismissed stale reviews from marlenaklein-msft and shaynie via d062dbd June 26, 2023 19:38
@AMollis AMollis enabled auto-merge (squash) June 26, 2023 19:49
@AMollis AMollis merged commit aeadb57 into microsoft:mrtk3 Jun 26, 2023
7 checks passed
@AMollis AMollis deleted the user/amollis/mrtk3/list-scrolling-test branch June 27, 2023 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants