原因
在Unity2019.4 把UnityEngine.UI.dll 等一些常用dll改路径了
新的路径在: C:/Program Files/Unity/Editor/Data/Resources/PackageManager/ProjectTemplates/libcache/com.unity.template.universal-7.3.1/ScriptAssemblies/UnityEngine.UI.dll
解决方案
手写路径 导入
在VSCode中找到工程的Assembly-CSharp.csproj,相应位置输入如下:
<Reference Include="UnityEngine.UI">
<HintPath>C:/Program Files/Unity/Editor/Data/Resources/PackageManager/ProjectTemplates/libcache/com.unity.template.universal-7.3.1/ScriptAssemblies/UnityEngine.UI.dll</HintPath>
</Reference>
保存即可。