Search Unity

No input detected after a while

Discussion in 'Input System' started by Skorpion5789, Jul 6, 2019.

  1. Skorpion5789

    Skorpion5789

    Joined:
    Jun 21, 2018
    Posts:
    1
    Hi, I was playing around with the new Input System Package and after I tried to make a singleton implementation of the system, it stopped detecting any input whatsoever. I tried to make a private variable of my MasterInput class (the generated one) and assign it a new value in the Awake() function. It still doesn't work.

    It seems like I have the same issue as this user here.

    After enabling Event Diagnostics, nothing appeared in the console.

    Here is my code:
    Code (CSharp):
    1. public MasterControls con;
    2. private void Awake()
    3. {
    4.      con = new MasterControls();
    5.      con.Player.Shoot.performed += ShootPressed;
    6. }
    7.  
    8. private void ShootPressed(UnityEngine.InputSystem.InputAction.CallbackContext obj)
    9. {
    10.      Debug.Log("We've shot!");
    11. }