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

Support the new Unity Input System #1676

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from
Open

Conversation

rblenkinsopp
Copy link
Member

@rblenkinsopp rblenkinsopp commented Feb 5, 2025

Summary

This ensures that all the parts of the main Ultraleap Tracking package support the new Unity Input System.

Only the UIInputModule in the Tracking Preview package and the controller example for the input manager does not work with this system. These have been split into a set of examples for the input manager (old) from the existing tracking preview examples which are now the main examples. There is also a common set of example assets that need to be imported for both example 'packages' to work.

While splitting/moving the examples, a couple of issue have been fixed with the UI input scene

  1. The indirect click has been fixed.
  2. The toggle button text now finally toggles with the toggle state to on/off!

Contributor Tasks

  • Create or edit test cases here
  • Add a CHANGELOG entry for this change.
  • Ensure documentation requirements are met e.g., public API is commented.
  • Consider any licensing/other legal implications for this MR e.g. notices required by any new libraries.

Test Cycle

Link to the test cycle here.

Reviewer Tasks

  • Code reviewed.
  • Non-code assets e.g. Unity assets/scenes reviewed.
  • All tests must be ran and cover all scenarios (If not, add new tests to the cycle and run them).
  • Documentation has been reviewed.
  • Approve with a comment of any additional tests run or any observations.

Related JIRA Issues

If this MR closes any JIRA issues list them below in the form Closes PROJECT-#

Pull Request Templates

Switch template by going to preview and clicking the link - note it will not work if you've made any changes to the description.

You are currently using: default.md

Note: these links work by overwriting query parameters of the current url. If the current url contains any you may want to amend the url with &template=name.md instead of using the link. See query parameter docs for more information.

@rblenkinsopp rblenkinsopp marked this pull request as ready for review February 5, 2025 16:07
@MaxPalmer-UH
Copy link
Contributor

MaxPalmer-UH commented Feb 5, 2025

Just tried pulling that branch and then using the physical hands example scene. Using Unity 2022.3 and a clean project with the XT Template. I see this (see below). Perhaps some of our samples are set up not to use the new input system?

@MaxPalmer-UH
Copy link
Contributor

image

@rblenkinsopp
Copy link
Member Author

Just tried pulling that branch and then using the physical hands example scene. Using Unity 2022.3 and a clean project with the XT Template. I see this (see below). Perhaps some of our samples are set up not to use the new input system?

That's possible, I was ensuring that all the places where the old input system was used also had pathways for the new input system in parallel. I'll pull that example and take a look.

@MaxPalmer-UH
Copy link
Contributor

MaxPalmer-UH commented Feb 5, 2025

Ah, looks like we need to go through the samples and search for EventSystem, then hit this button? (Yes, that clears out the warnings)

@MaxPalmer-UH
Copy link
Contributor

image

@rblenkinsopp
Copy link
Member Author

Ah OK, then yes we should update the samples by default to the new system I think?

@MaxPalmer-UH
Copy link
Contributor

Yes, I think so.

@rblenkinsopp
Copy link
Member Author

I double-checked the code regarding the two versions of the tracked pose driver, it already handles both of those cases correctly. However, we may also want to convert the samples to use the new Tracked Pose Driver (Input System) version rather than the legacy one.

@rblenkinsopp rblenkinsopp marked this pull request as draft February 25, 2025 09:08
@rblenkinsopp rblenkinsopp marked this pull request as ready for review March 20, 2025 11:04
@rblenkinsopp rblenkinsopp force-pushed the rcb/new-input-system branch from 3f370c6 to 10fc84d Compare March 20, 2025 12:30
@rblenkinsopp
Copy link
Member Author

rblenkinsopp commented Mar 20, 2025

I've rebased this now to avoid a duplication of all the copyright changes.

@rblenkinsopp
Copy link
Member Author

I fixed a few errors that I noticed during review with the preview package's import all examples script. I had to rename the samples to match the folders to get consistent behaviour again (other wise it gets imported with the display name which isn't very helpful), it was also missing an import to the base examples package for the SampleDependencyImporter.

@rblenkinsopp
Copy link
Member Author

What other changes did you make to the scene files, as at first glance they are still using "Input Pose Driver"?

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

Successfully merging this pull request may close these issues.

2 participants