Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

PlayerInput.DeactivateInput() does nothing

Discussion in 'Input System' started by blu3drag0n, Jul 11, 2022.

  1. blu3drag0n

    blu3drag0n

    Joined:
    Nov 9, 2018
    Posts:
    94
    Hey,

    following the PlayerInput.DeactivateInput() docs it should be pretty straight forward and obvious.
    But actually neither DeactivateInput() and ActivateInput() do anything. Neither activate/deactivate the PlayerInput component, nor do they deactivate/activate the consumption of input anyhow - tested in both directions.

    Any ideas?

    **EDIT** funny enough: manually disabling the PlayerInput component and enabling it by code works.
    But have it enabled and disable the component by code does not work.
    Never seen that before. What is it ?

    KR
    blu3
     
    Last edited: Jul 11, 2022
  2. blu3drag0n

    blu3drag0n

    Joined:
    Nov 9, 2018
    Posts:
    94
    Forget it, I'm an idiot and had a co-routine that based on another value constantly called my method to "RunGame" which basically s also activates the PlayerInput component.
    nvm, sorry!