Search Unity

Bug Switching action maps using sample XR Input Maps and PlayerInput exceptions, easily reproducible

Discussion in 'Input System' started by Austin-Gregory, Feb 23, 2021.

  1. Austin-Gregory

    Austin-Gregory

    Joined:
    Sep 19, 2013
    Posts:
    78
    Edit: Appears to have been tracked and fixed for 1.1.0 and isn't XR related: Issue Tracker

    How to reproduce bug:
    Install Input System, XR Plugin Manager w/ oculus (in my case), and XR Interaction Toolkit. Create an Action-based XR Rig and apply the input maps to it. Now add a PlayerInput component to the scene and leave the component with default values. Running the project, exceptions will be thrown when the PlayerInput "Auto-Switch" is triggered by switching from the HMD input to the XR Controller inputs. No events or anything are added to PlayerInput, the exceptions are raised just by enabling the controllers while testing the project.

    Example: run the project, put on the headset (HMD map is active), use a controller (XR controller map is active) and then HMD input breaks and no longer has tracking. Console lists a few exceptions, mostly out-of-bounds exceptions.

    Exceptions after reproducing bug:


    I've already submitted a bug report with the project that's the minimum for reproducing it (assuming it's XR specific). If this is XR specific, I'm hoping for some direction for now on how to handle the issue for now by perhaps manually switching these maps? I'm not sure here. Controller and HMD tracking works great until I try to use PlayerInput for anything. I'm not sure yet if by-passing PlayerInput and registering these events myself will handle the issue seeing as it's specific to switching the maps (at least with Auto-Switch).

    I've also attached this project here.

    Any help would be appreciated, thanks!

    Edit: I've updated my bug report with a video showing the steps to reproduce this issue so I figured I would do the same here.
     

    Attached Files:

    Last edited: Feb 26, 2021
  2. Austin-Gregory

    Austin-Gregory

    Joined:
    Sep 19, 2013
    Posts:
    78
    Added a video showing step-by-step how to reproduce this issue.