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

Bug Buttons don't work with unity's new input system.

Discussion in 'Input System' started by cashman91431, Aug 24, 2022.

  1. cashman91431

    cashman91431

    Joined:
    Aug 21, 2022
    Posts:
    16
    when I added button to my project(with new input system) it started throwing this error:
    Code (CSharp):
    1. InvalidOperationException: You are trying to read Input using the UnityEngine.Input class, but you have switched active Input handling to Input System package in Player Settings.
    2. UnityEngine.EventSystems.BaseInput.GetButtonDown (System.String buttonName) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/InputModules/BaseInput.cs:126)
    3. UnityEngine.EventSystems.StandaloneInputModule.ShouldActivateModule () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/InputModules/StandaloneInputModule.cs:227)
    4. UnityEngine.EventSystems.EventSystem.Update () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:474)
    ikd how to fix
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,513
    This is the 2D forum which has nothing to do with your post. So you know, the 2D forum isn't for any feature problem you encounter when making a 2D game.

    Here's the ones related to your issue:
    Input System
    UI

    You can find the available forums here.

    EDIT: Moved to the Input System forum.
     
    Last edited: Aug 24, 2022
  3. TylerJay-B

    TylerJay-B

    Joined:
    Dec 29, 2018
    Posts:
    17
    Simply click on the eventhandler in your hierarchy and there should be a button in the inspector to fix this.