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

UnityEngine.InputSystem not found

Discussion in 'Editor & General Support' started by BigDaveNz, Aug 5, 2020.

  1. BigDaveNz

    BigDaveNz

    Joined:
    Apr 11, 2019
    Posts:
    3
    Hello all,

    I thought I would try out the new input system.

    If generate the C# class from the input actions asset, in the Assets folder of the project. it can see the namespace UnityEngine.InputSystem. However as soon as I move that file into the Assets/Scripts directory, suddenly that namespace is not found.

    Any Ideas?

    I've tried installing/reinstalling the plugin, as well as switching my project to/from the old input system.
     
    ivanverdehernandez likes this.
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    You need to add a reference to the Input assembly definition(asmdef) for the asmdef that I assume you have in Assets/Scripts.
    upload_2020-8-5_13-29-47.png
     
  3. BigDaveNz

    BigDaveNz

    Joined:
    Apr 11, 2019
    Posts:
    3
    Thankyou so much! This is exactly the problem, I required the asmdef for my unit tests to work properly.
     
    hotroddd1 and karl_jones like this.
  4. hotroddd1

    hotroddd1

    Joined:
    Feb 12, 2018
    Posts:
    8
    Karl Jones this is exactly the same issue I was having. It would great to see this info added to the "What if..." section of the Input System docs.
     
    karl_jones likes this.
  5. unitydungeonmas

    unitydungeonmas

    Joined:
    Sep 6, 2020
    Posts:
    37
    fixed for me too, ty
     
  6. TimPham

    TimPham

    Joined:
    Sep 22, 2020
    Posts:
    5
    This fixed for me! Thank you
     
  7. Owen_Delisle

    Owen_Delisle

    Joined:
    Dec 14, 2017
    Posts:
    1
    Works thank you!
     
  8. SirianSun

    SirianSun

    Joined:
    Jul 3, 2012
    Posts:
    4
    In my case, building and running my VR app to Oculus Quest 2 would end up removing the entry if I added it as in the steps listed above. I ended up deleting the Assembly file all together and it solved my problem. The error was appearing for an Asset that I was trying (VR Interaction Framework by BNG). Everything ran fine the first try, then I changed a few settings and the error message started appearing. As mentioned, deleting the file fixed the issue.
     
  9. krishnapriyachoudoor

    krishnapriyachoudoor

    Joined:
    Jun 2, 2021
    Posts:
    8
    Hello, I have the following errors. I am not sure if this is the fix I am looking for, could you please help me/redirect me to the appropriate thread, if any ?

    InputsystemErrors.png
     
  10. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    Those errors are coming from a package. Can you share the editor log file?
     
  11. krishnapriyachoudoor

    krishnapriyachoudoor

    Joined:
    Jun 2, 2021
    Posts:
    8
  12. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    Looks like something is wrong with your packages

    Assembly for Assembly Definition File 'Packages/com.unity.inputsystem/InputSystem/Unity.InputSystem.asmdef' will not be compiled, because it has no scripts associated with it.

    Maybe try a reset Help/Reset packages to default
     
  13. Sabhari_Shrinivas

    Sabhari_Shrinivas

    Joined:
    Oct 31, 2020
    Posts:
    1
    Where do i find this file ? I see similar files but they are all greyed out and uneditable
     
    kloot, lolhans, m0ty0 and 1 other person like this.
  14. lolhans

    lolhans

    Joined:
    Dec 12, 2019
    Posts:
    7
    I find this file, but the inspector is greyed out and uneditable, what can i do?
     
  15. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    What file are you trying to edit. If its not editable then its probably read only and part of an immutable package.
     
  16. lolhans

    lolhans

    Joined:
    Dec 12, 2019
    Posts:
    7
    Thanks for your awnser, i thought i need to edit the Unity.InputSystem.asmdef that is located in the unity system folder. The inspector window of this file is greyed out, since it is not editable. I recognized, that this makes no sense at all.

    I was able to fix the problem by editing the assembly definition file of the asset, that tries to use the unityengine.inputsystem namespace. In my case it was the free asset "in-game debug console".
     
  17. echohux

    echohux

    Joined:
    Sep 30, 2022
    Posts:
    1
    where can I find this?
     
    kloot likes this.
  18. RahmatAli_Noob

    RahmatAli_Noob

    Joined:
    Sep 13, 2022
    Posts:
    70
    Hi I tried to Edit the File But it greyed out here is the Reference Image Any Idea how to DO it
    upload_2023-6-13_13-39-36.png
    @karl_jones
    Your Help will be Appreciated.
    Thanks in Advance.
     
  19. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    Why are you trying to edit the input system asmdef?
    If you want to reference it then you need to add a reference to that file in your asmdef.
     
  20. RahmatAli_Noob

    RahmatAli_Noob

    Joined:
    Sep 13, 2022
    Posts:
    70
    Got it Thanks' for your Time and the Response to this Thread.
     
  21. Abinm

    Abinm

    Joined:
    Jun 1, 2021
    Posts:
    1
    i solved my issue by Package Installation: Go to Window -> Package Manager and searching for 'Input System.' If it's not installed, click on the 'Install' button to add it to your project
     
  22. RahmatAli_Noob

    RahmatAli_Noob

    Joined:
    Sep 13, 2022
    Posts:
    70
    I have tried it At set the Both at the Player settings, But the Issue here I mentioned is related to the Package That I Am using the Advance Input System 2. So ended Up not Using that Asset Instead I use the RTL Pro to use the Arabic and English In My Project.
    Thanks for Your Concern.