UnityEngine.InputSystem not found

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.

1 Like

You need to add a reference to the Input assembly definition(asmdef) for the asmdef that I assume you have in Assets/Scripts.

16 Likes

Thankyou so much! This is exactly the problem, I required the asmdef for my unit tests to work properly.

2 Likes

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.

1 Like

fixed for me too, ty

This fixed for me! Thank you

Works thank you!

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.

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 ?

202f808a175d2c35921d5a1b01b0b609ce14bf9c.png

Those errors are coming from a package. Can you share the editor log file?

Thank you for your response. PFA in the link - https://drive.google.com/file/d/13KfRtQYHhxSVD3GSdL97TioaOJH-xVUT/view?usp=sharing

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

Where do i find this file ? I see similar files but they are all greyed out and uneditable

4 Likes

I find this file, but the inspector is greyed out and uneditable, what can i do?

What file are you trying to edit. If its not editable then its probably read only and part of an immutable package.

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”.

4 Likes

where can I find this?

1 Like

Hi I tried to Edit the File But it greyed out here is the Reference Image Any Idea how to DO it


@karl_jones
Your Help will be Appreciated.
Thanks in Advance.

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.

Got it Thanks’ for your Time and the Response to this Thread.