Search Unity

Resolved MagicLeap XR Plugin not working with new InputSystem

Discussion in 'AR' started by JimboJonesBL, Sep 7, 2021.

  1. JimboJonesBL

    JimboJonesBL

    Joined:
    Jul 16, 2020
    Posts:
    19
    Hey,
    I'm trying to get the MagicLeap XR Plugin 6.2.2 working the new InputSystem 1.1.0-pre5. I tried both packages in different version variations and preview packages but nothing helped.

    The versions I tried under Unity 2020.3.11:
    ML XR: 6.2.2 verified, 6.3.0-preview.2, 6.4.0-pre.3
    InputSystem: 1.0.2 verified, 1.1.0-pre.5 and pre.6

    The error from the screenshots describes, that the controller device cannot be created because of a mismapping of the bumper button. It seems like it expects another type than it is mapped to, namely AxisControl instead of ButtonControl. I'm not 100% sure which side is responsible for the error. But the script DeviceLayouts.cs that has the mapping (and is only executed under the new InputSystem) resides in the MagicLeap XR Plugin package.

     
    Last edited: Sep 7, 2021
  2. JimboJonesBL

    JimboJonesBL

    Joined:
    Jul 16, 2020
    Posts:
    19
  3. cmd_Unity

    cmd_Unity

    Joined:
    Apr 21, 2019
    Posts:
    5
    Hey JimboJones,
    I ran into the same problem, did you found a solution for this?
    I do not even get the point of this issue, cause in DeviceLayout.cs the bumper IS a ButtonControl not an Axis !

    Code (CSharp):
    1.       protected override void FinishSetup()
    2.         {
    3.             base.FinishSetup();
    4.  
    5.             touchpad1Pressed = GetChildControl<ButtonControl>("touchpad1Pressed");
    6.             touchpad1Position = GetChildControl<Vector2Control>("touchpad1Position");
    7.             touchpad1Force = GetChildControl<AxisControl>("touchpad1Force");
    8.  
    9.             touchpad2Pressed = GetChildControl<ButtonControl>("touchpad2Pressed");
    10.             touchpad2Position = GetChildControl<Vector2Control>("touchpad2Position");
    11.             touchpad2Force = GetChildControl<AxisControl>("touchpad2Force");
    12.  
    13.             triggerButton = GetChildControl<ButtonControl>("triggerButton");
    14.             trigger = GetChildControl<AxisControl>("trigger");
    15.           /* >>>*/ bumper = GetChildControl<ButtonControl>("bumper"); /*<<<*/
    16.             menu = GetChildControl<ButtonControl>("menu");
    17.  
    18.             dof = GetChildControl<IntegerControl>("dof");
    19.             calibrationAccuracy = GetChildControl<IntegerControl>("calibrationAccuracy");
    20.             type = GetChildControl<IntegerControl>("type");
    21.         }
     
  4. JimboJonesBL

    JimboJonesBL

    Joined:
    Jul 16, 2020
    Posts:
    19
    Last edited: Mar 7, 2022
  5. cmd_Unity

    cmd_Unity

    Joined:
    Apr 21, 2019
    Posts:
    5
    Hi,

    I did use 6.2.2, same as you.
    I can not update to 6.4.2 (not available in Package Manager, using unity 2020.3.22).
    Only to 6.4.1 and it seems to work now, I do not get the error message any more. ("seems" because I am far away of understanding the new input system in context with XR-Interaction Toolkit and so on:confused:o_O:confused:)

    Thank you very much.
     
  6. JimboJonesBL

    JimboJonesBL

    Joined:
    Jul 16, 2020
    Posts:
    19
    I'm glad you got it working!

    If you still find yourself in trouble, make sure to check "Enable preview packages" in the Advanced Settings of the PackageManager

    upload_2022-3-11_13-17-27.png

    With this you should be able to see version 6.4.2-preview.1 of the package:

    upload_2022-3-11_13-18-51.png
     
  7. cmd_Unity

    cmd_Unity

    Joined:
    Apr 21, 2019
    Posts:
    5
    ....thank you for the detailed explanation :)

    Have you switched back to 6.2.2?
     
  8. JimboJonesBL

    JimboJonesBL

    Joined:
    Jul 16, 2020
    Posts:
    19
    Happy to help! :)

    For releasing our product we cannot use preview packages. But good point! We should at least consider updating to 6.4.1 :)