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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

New InputSystem conflict with Unity UI package 1.0.0

Discussion in 'Input System' started by On-Stand-By, Sep 4, 2021.

  1. On-Stand-By

    On-Stand-By

    Joined:
    Sep 30, 2017
    Posts:
    14
    Hi !

    I'm running into an issue. I just moved onto the new InputSystem and it conflicts with the Unity UI package, required by TextMeshPro.

    In MultipleDisplayUtilities.GetMousePositionRelativeToMainDisplayResolution() there's this line :
     var position = Input.mousePosition; 
    Which throws this exception every frame :

    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.

    I can't edit it as any change is overridden automatically.

    Am I missing somthing or is there anything I do to fix this ?

    Thank you.
     
  2. On-Stand-By

    On-Stand-By

    Joined:
    Sep 30, 2017
    Posts:
    14
    Found a solution :
    You just need to replace the Standalone Input Module with InputSystemUIInputModule by clicking on the button it shows.
    Forgot that creating a canvas will automatically create a EventSystem in the scene. Sorry !