Search Unity

Bug OnControlsChanged message not sent after object is moved to another scene

Discussion in 'Input System' started by woodbyte, Aug 9, 2020.

  1. woodbyte

    woodbyte

    Joined:
    Apr 3, 2013
    Posts:
    2
    I have a camera controlled by PlayerInput actions (using "Send Messages" behavior and implementing OnLook, OnMove and OnControlsChanged). Everything works as expected until I move the camera into another scene, after which only the actions themselves are received but the OnControlsChanged is no longer called.

    This happens for both SceneManager.MoveGameObjectToScene() and transform.parent assignment. The scene itself is created with SceneManager.CreateScene() and I've yet to test if one loaded instead might not experience the issue as that would not be an applicable solution for this project, anyway.

    Note that the PlayerInput component is still correctly auto-switching between schemes, it just doesn't send the message. It's not a big issue by any means, as I can still query the component on each update, but it does appear to be a bug with the Input System.

    Unity 2019.4.7f1
     
  2. Brouilles

    Brouilles

    Joined:
    Apr 14, 2019
    Posts:
    5
    Same here. Any fix?