ultraleap / UnityPlugin

Ultraleap SDK for Unity.
https://docs.ultraleap.com/unity-api/
Apache License 2.0
531 stars 168 forks source link

Added default constructor to LeapXRHandProvider with [Preserve] attri… #1654

Closed MaxPalmer-UH closed 2 months ago

MaxPalmer-UH commented 2 months ago

…bute to fix issue using XRHands with Ultraleap data on Quest

Summary

Attempting to use XRI with XRHands and a Leap2 on a Quest can cause issues. The XR Hands subsystem bridge to pipe data from the LeapXRProvider to the XR Hands subsystem fails, the attempt to call Activate.CreateInstance for the LeapXRHandProvider type throws as a default constructor cannot be found. It appears an empty constructor is needed with the [Preserve] attribute.

Contributor Tasks

Test Cycle

Link to the test cycle here.

Reviewer Tasks

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.