Search Unity

Unity Render Pipeline Debug clashes with New Input System

Discussion in 'Universal Render Pipeline' started by castleofwarriors, Aug 27, 2019.

  1. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,118
    I'm not sure how to do that.

    but,

    struggling with this issue today so for those that still have the problem this is some steps I took to get rid of the issue (for now) regarding cinemachine

    first as someone mentioned I've opened all the scenes in the project and where there was an EventSystem present I've upgrade it to use the new input system. Not sure if this has anything to do with this fix but if the rest of the changes bellow don't work then try this as last resort.

    so if the error is related with cinemachine

    no need to use both input systems old and new

    instead, when creating a camera you need to delete all references to Mouse X or similar that are included by default in the newly created cinemachine camera object.

    some may be hidden in submenus or hard to see at a glance so look carefully.

    once you got rid of all these references it works.

    now is annoying because they will get included each time you create a new cinemachine camera but such is life at least there is a solution to the error

    now how do I pass the mouse input to cinemachine using this new system?

    that I'm trying to understand now, when I will find a solution I will post it here.

    because the idea is to get rid of the annoying old input system and use exclusively the new one. if someone knows a tutorial or something please share
     
  2. Qmansvednetta

    Qmansvednetta

    Joined:
    Mar 8, 2017
    Posts:
    8
    This Fixed it for me. Installed the new input manager from the package manager. Player settings input systems set to "both" option and replacing standalone input to the InpusystemUIInputModule.
     
  3. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,118
    ok so it turns out that this error actually happens because the cinemachine setup is not complete after adding the cinemachine brain and a camera.

    what we actually need to do is to also add a cinemachine input script on each camera. that script will remove the user interface fields where the hardcoded Mouse X or Y variables are present. no need to remove those they will get removed automatically.

    this will let you to interact with the camera using the new input system without having both inputs selected in the layer preferences which defeats the purpose of having the new input system.

    BUT

    when doing all this on an existing project and also doing the "Replace with InputSystemUIInputModule" trick mentioned you may end up with multiple input systems config files that are not matching. So check what settings/config input file the InputSystemUIInputModule actually uses in the scene.
     
  4. brandon121888

    brandon121888

    Joined:
    Mar 13, 2021
    Posts:
    1
    upload_2021-3-13_23-12-52.png
    here is how I fixed this bug
     
  5. Shashankrajpoot

    Shashankrajpoot

    Joined:
    Jan 12, 2020
    Posts:
    1
    upload_2021-3-17_1-17-24.png

    Hi there, I think this will help for the above mentioned errors

    Just Select "Both" for Active Input Handling in player settings ----------->other settings
     
    IMC-Lab likes this.
  6. montanhabio

    montanhabio

    Joined:
    Aug 8, 2020
    Posts:
    6
    This fixed the issue for me too.
    Thanks
     
  7. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,118
    I want to point out that setting the input handling to both practically defeat the purpose of having a new improved input system. The correct way to work if you want the new input system is to add another script that is included with cinemachine

    cinemachine input script

    add this on a cinemachine camera

    this way the cinemachine will not search for the old input anymore and you will not get this error
     
  8. ReginRS

    ReginRS

    Joined:
    Feb 26, 2020
    Posts:
    6
    [QUOTE = "T-Zee, postagem: 4959836, membro: 1553126"] Acabei de encontrar isso ao tentar converter para o novo pacote de sistema de entrada.

    o único conselho que encontrei para isso é habilitar os dois sistemas de entrada nas configurações do player até que seja corrigido [/ QUOTE]


    Onde eu habilito esses dois?
     

    Attached Files:

  9. iBeoZD

    iBeoZD

    Joined:
    Oct 21, 2020
    Posts:
    1
    Thank you so much thats solve the errors ;););)
     
  10. hashirali123

    hashirali123

    Joined:
    Feb 3, 2021
    Posts:
    1
    You probably tried to import a new input system package for multiple input devices compatibility. These type of errors are due to conflict between old and new input system packages and are probably resolved in latest updates. To resolve this issue, Go to Edit -> Project Settings->Player->Under Other Settings under Configuration is the option Active Input Handling. Select Both. Unity will restart. Now your problem should be solved. You will be able to use old input system packages and the new ones also simultaneously. Cheers. Capture.PNG
     
    erw29 likes this.
  11. a19tonguepar

    a19tonguepar

    Joined:
    May 30, 2020
    Posts:
    2
    I fixed that problem using in Player settings "Both" unity input system, but in game just the new one, then i have no errors, and all work fine.
     
  12. chickenbone2

    chickenbone2

    Joined:
    May 6, 2021
    Posts:
    1
    thanks, it worked fine for me
     
  13. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    I'm still getting this error when using the new Input system, Unity 2021.2.0a17 HDRP 12.0!!
     
  14. MahmoudAshrafCis

    MahmoudAshrafCis

    Joined:
    Nov 12, 2017
    Posts:
    2
    I Had this issue with using the new Input system via the package manager, with the ML-agent example project though not the URP
    i found the solution here
    Migrate From Old Input System
    i replaced any code that is using the Input class for instance
    Input.GetKeyDown(KeyCode.Alpha1)

    will be replaced with
    Keyboard.current.digit1Key.isPressed


    then the error message was gone
     
  15. colace

    colace

    Joined:
    Mar 27, 2021
    Posts:
    1
    Hi,
    i solve put in "Project Settings \ Player"
    Section: "Other Settings"

    Set "Active Input Handling" in "both".

    Good Job.!!!
     
  16. Hypning

    Hypning

    Joined:
    Jul 10, 2021
    Posts:
    2
    Thankss :):)
     
  17. hemasree_s

    hemasree_s

    Joined:
    Jul 23, 2021
    Posts:
    2
    Go to File -> Build Setting -> Player Settings -> Player -> Other Settings -> Active Input Handling ->Both

    Click on yes for restarting
     
  18. superjava250609

    superjava250609

    Joined:
    Apr 27, 2021
    Posts:
    2
  19. RedHillbilly

    RedHillbilly

    Joined:
    Mar 24, 2014
    Posts:
    39
    Same, with Unity 2021.2.0b6, InputSystem 1.1.0-pre.5 and URP 12.0.0

    Adding a UI > EventSystem to the first loaded scene seems to fix the issue.
     
    Last edited: Sep 1, 2021
  20. BenWinworth

    BenWinworth

    Joined:
    Jun 19, 2019
    Posts:
    1
    ur my hero <£<£<£<£<£<£<£<£<£<
     
  21. wechat_os_Qy06FjaDX0rJbQfQrJu0THElk

    wechat_os_Qy06FjaDX0rJbQfQrJu0THElk

    Joined:
    Sep 6, 2021
    Posts:
    1
    Ooooh! It works! Thanks! Love U!
     
  22. _Vaclav_

    _Vaclav_

    Joined:
    Apr 20, 2016
    Posts:
    5
    I have come across this issue as well and want to share my findings. I figured out the source of this issue for me, but best I give some context.

    I created 1 scene and added a FPS controller library to be able to move around easily and test it out. No problem

    later I created a new scene and imported a different FPS controller to use in that scene. Big error and I could not move around the map...

    From my conclusion, it seems that both were conflicting to allow access to your controls and thus Unity was giving the error "invalidoperationexception you are trying to read input using the unityengine.input class" etc.

    I backtracked through PlasticSCM to figure out what changed and when. When I added the first controller, it also changed the situation here:
    Edit > Project Settings > Input System Package
    Unity says "This is where you can configure the controls..... But you have switched input handling to "Input System Package" in your Player Settings. The input manager will not be used.

    So the first FPS controller has changed who controls input.. from the Unity default. Makes sense then if you allow both old and new it should work?

    Went to the same page as others suggest:
    Edit > Project Settings > Player > Active Input Handling change it to both. This then fixed it for me because it allowed both to exist in the project. Also I noticed the Input Manager was not showing a warning but available.

    I did not see anyone point out that they have 2 player controller libraries imported. So, I wanted to highlight this as a possible connection to the problem. This is what I saw was the case for me.

    (if you're asking why I have two, it's because each scene was a different mini-tutorial project and I was using new scenes for each to keep them grouped together. rather than creating a new project.. maybe not the best idea)
     
    Last edited: Oct 12, 2021
  23. peybol1

    peybol1

    Joined:
    Sep 27, 2021
    Posts:
    1
    It worked for me!!
     
  24. respaldo

    respaldo

    Joined:
    Sep 22, 2021
    Posts:
    1
    that worked perfectly thank you so much
     
  25. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,364
    so they regressed it since urp 8
     
  26. kyuskoj

    kyuskoj

    Joined:
    Aug 28, 2013
    Posts:
    56
    Unity 2021.2.1 / URP 12.1 / Active Input Handling = both
    It still occurs.

    Code (CSharp):
    1. for (int actionIndex = 0; actionIndex < m_DebugActions.Length; ++actionIndex)
    m_DebugActions is null.
     
  27. SiwikGames

    SiwikGames

    Joined:
    Nov 23, 2020
    Posts:
    1
    Yes, fixed for me as well !
     
  28. GameDeveloper1111

    GameDeveloper1111

    Joined:
    Jul 24, 2020
    Posts:
    100
    Unity 2020.3.14f1 / URP 10.5.1 / Active Input Handling = both

    It still occurs for me occasionally. It's lightly correlated with building (it could be a coincidence). Restarting the editor keeps it away for a while.
     
  29. Neil3012

    Neil3012

    Joined:
    Apr 20, 2018
    Posts:
    1
    Go to Player Setting => Other Setting and search for Active Input Handling. Set it to "Both". This solve my Issue.
     
  30. Damienls

    Damienls

    Joined:
    Nov 2, 2020
    Posts:
    2
    I use unity 2020.3.19f1 with HDRP and when i turn to "both" it doesn't change anything..I always have the same error...

    My Unity restart and comeback to Input system package (new)
     
  31. YeikooUY

    YeikooUY

    Joined:
    Sep 8, 2021
    Posts:
    1
    tengo una solución que podría ayudarte. tenes que ir a: build and settings / Player Settings / Player. luego buscas la opción que dice "Active Input Handing" en esa opción elegís la que dice both. eso utilizara el teclado del unity viejo junto con el del unity nuevo. tal vez tu error sea que estés usando el script de teclas viejo. yo lo resolví haciendo.
     
    KoalaJoe likes this.
  32. henriquecerquinho

    henriquecerquinho

    Joined:
    Feb 24, 2021
    Posts:
    1
    Bless you all, worked for me too!
     
  33. Stonemass

    Stonemass

    Joined:
    Mar 28, 2015
    Posts:
    22
    10/02/2022 we still having the same problem ! haha so funy
     
  34. unity_mHhh-9wN3ABS6A

    unity_mHhh-9wN3ABS6A

    Joined:
    Mar 4, 2022
    Posts:
    1
    ya, it happened on my pc too. but I fixed it by resetting the player setting in the Project setting try it.
     
    Last edited: Mar 4, 2022
  35. KoalaJoe

    KoalaJoe

    Joined:
    Mar 23, 2020
    Posts:
    2
    Hi there people! I was having the same issue as you, with the New Input system. As I combed through this thread for an answer. None worked for me. So I decided to **Read... Over and over and over and... You get the picture lol. I read the error msg quite a few times, until I found the root of the problem off the error msg, along with a much simpler solution to the issue! The proper solution --> Both options I tried work.
    ** Follow the steps I'm about to provide to fix your issue. If it's the same error msg most of us are getting (This is me going of the thread problem listed,) these steps should fix your issue. Don't worry, All the steps needed to get to the solution are provided! (This is a Windows Unity solution, sorry. But Mac, is not really that different. Just match the Tab names and you should be OK.)


    A. Open your project (Do not have any of your scripting files open in any external editors... Visual studio, Atom, etc. --> none.)

    B. Next to the 'File' Tab, you have the 'Edit' Tab, click on 'Edit.' This will be at your top left hand side of your screen on Unity for Windows.

    C. In the 'Edit' selections, scroll down to 'Project Settings...' And click /select it. (It's about 2/3ds down in the 'Edit' options.) | A new window will open named 'Project Settings.'

    D. In this new 'Project Settings' window, click/select the 'Player' options Tab. It's 1/3 down, on Unity for Windows, it's right bellow 'Physics 2D.' Do NOT click on Physics 2D, this is only a road marker! Select the 'Player' option.

    E. In the 'Player' options available on the right side of the screen, expand the 'Other Settings' option. Do this by clicking on the triangle next to it. It looks just like the option the 'Inspector' window gives, when we need to expand or close the view of available options a GameObject has for us to fiddle with. --> In 'Other Settings,' scroll down to the 'Configuration' option. It's right bellow the 'Mac App Store Options.' --> 'Configuration.'

    F. In the 'Configuration' options, you will see a Tab to the right of it, click on the drop down arrow and select either 'Input Manager Old,' or the option for 'Both.' I tested both options, they both worked and my input problem was solved!

    **G** Or just select whatever Input setting work to solve your problem. There are 3 options, one of them should work! You might need to go back to the error one first, before it allows you to jump between the available two other options available.


    P.S. 'Input System Package (New),' is what was causing my problem.


    Note: I'm enclosing screen pics, in order to provide some visual assistance. Good luck!

    Input System Package Problem.png Directions.png Wrong input manager.png Good Input A.png Good Input B.png
     
    Last edited: May 13, 2022
  36. MrDecisive

    MrDecisive

    Joined:
    Mar 26, 2019
    Posts:
    5

    This fixed it for me