Search Unity

Bug Equipping VR headed Spams OnControlsChanged until removed

Discussion in 'Input System' started by Nathanieljla, May 14, 2022.

  1. Nathanieljla

    Nathanieljla

    Joined:
    Apr 18, 2014
    Posts:
    97
    I'm using the player input component to detect (via OnControlsChanged) when the user equips a VR headset. You can see from the included image that the moment the headset is equipped the OnControlsChanged handler is continually spammed until I take the headset off and I'm not sure why. When looking at the summary of the callstack (via the output window) one the controlsChanged logs contains no input params. The other contains two (?) input params (I dont' have access to the VR equipment this weekend to verify what the input types were). If anyone has any thoughts I'm all ears. Thanks! This seems like a bug to me, because I would expect the OnControlsChanged to only be called once.

    the log is:
    start game with keyboard and mouse
    reach over and put on headset (handler gets spammed)
    take headset off (triggers deviceLost callback)
    touching the keyboard returns me to keyboard and mouse.

    controlsChanged.PNG