I came across the same issue, and solved it. so, leaving a note here.
my case
In my case, after installing the new InputSystem package by Package Manger
on Unity Editor, and then restarting Unity Editor following the appeared dialog, I could see Input System
under Packages
folder on Project
view. However, any reference to namespece UnityEngine.InputSystem
got errors.
What I found that Unity.InputSystem.dll didn't exist under [Project Dir]/Library/ScriptAssemblies/Unity.InputSystem.dll
, which is what the Unity project refers to. This path can be found in Assembly-CSharp.csproj
, placed right under Unity project directory.
Actually, it was not only for Input System package but also the same for all the other packages I uses. [Project Dir]/Library/ScriptAssemblies
only had 2 files, Assembly-CSharp.dll
and Assembly-CSharp.pdb
, although this directory should hold dll files from all the installed packages.
solution
My solution was simple.
- delete
Assembly-CSharp.csproj
file ( to be regenerated at some stage )
- close Unity Editor
- close Unity Hub
- open Unity Hub
- open Unity Editor
At the last step, before Unity Editor fully waked up, I could see all the package dll files are loaded to [Project Dir]/Library/ScriptAssemblies
directory.
I'm not so sure whether csproj file delete and Unity Hub restart was necessary, but this is what I did, which recovered my broken project.
my environment
- Unity 2019.4.14f1
- macOS 10.15.7
- Visual Studio 8.8.4