Search Issue Tracker
Not Reproducible
Votes
4
Found in
2019.2.0b1
2019.2.0b3
Issue ID
1156032
Regression
Yes
Missing Namespace UI error appears when a script tried to use UnityEngine.UI
After running through a few packages in the Assets Store, loading and unloading packages and DLLs, I got into a state with my project when Unity doesn't recognise "using UnityEditor.UI" in all the scripts in the Google Cloud Vision project.
This does not happen when i freshly install the Google Cloud Vision asset in a fresh new project.
To reproduce the error in the console:
- download this project
- open it with Unity 2019.2.0b3 or 2019.3.0a3 on Windows 10
- notice the compilation errors:
Assets\FrostweepGames\GCSpeechRecognition\Examples\Example\Example.cs(4,19): error CS0234: The type or namespace name 'UI' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)
Reproduced with Unity 2019.2.0b3 and 2019.2.0a3
Cannot reproduce in Unity 2019.1.0f2, 2019.3.0a2, 2019.2.0a14
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Android] [Vulkan] Cubes stuck on the first few frames of rotation and application flickering when an Overlay Camera is added to the Camera Stack with MSAA enabled
- Profiling information icon does not update for Light Mode
- [Linux] Type to select functionality is missing for drop down menus
- TextMeshPro calculates Width Compression incorrectly when using certain values in the WD% field
- VFX Graph link contrasts fail WCAG guidelines
tomatohorse
Apr 02, 2020 19:54
Thank you BENFC1993, your solution worked for me!
Keraberas
Apr 02, 2020 10:52
Hello, friends. In my case, my colleague had the same error. At the same time, everything was fine with me on the same project. Unity Version 2019.3.1. It turned out that in his repository the submodules had the wrong branches and there was simply a compilation error that caused a compilation error even of Unity libraries. Pay attention to errors when opening a project that occur first. Do not "Clear" in the console. So you will understand where the initial error is located, which launches the entire cascade of subsequent errors. Most likely the error lies in the order of compiling scripts in the Unity engine itself.
runette_unity
Mar 24, 2020 11:56
BTW - Manually forcing an upgrade of Visual Studio Code Editor package to 1.2.0 seems to have solved the problem
runette_unity
Mar 24, 2020 11:14
I just got this as well - 2019.3.6f1 was working OK until I installed a new package and then - bam!
Trignus
Mar 22, 2020 06:06
Same problem here, but I managed to solved it (at least for now). I did what BENFC1993 said, also did this: https://answers.unity.com/questions/1696517/20193-unityengineui-and-vs-code.html (downgrade the version of the Visual Studio Code Editor package), but even all that didn't fix it. So, I downgraded the version of the TextMeshPro Package as well (to 2.0.0), removed it, removed the Unity UI package, and reinstalled both. And after painful minutes, it was all working again. Hope to help someome. I was using version 2019.3.6f1 of Unity.
JackTR55555
Mar 17, 2020 06:03
I have the same issue in 2019.3.0f6 PLEASEEEE!!!!
benfc1993
Mar 06, 2020 19:44
All you need to do to fix this is got to Edit > Preferences > External Tools make sure the 'Generate all .csproj files.' is checked the in your IDE delete the:
Assembly-CSharp-Editor.csproj
Assembly-CSharp.csproj
Ecology.sln
files in the root of your project.
Close and reopen vscode.
luispuertolas
Feb 21, 2020 22:51
I installed UnityEngine.UI with Nuget from Visual Studio
https://www.nuget.org/packages/Unity3D.UnityEngine.UI/
This solved it for me.
iklein
Feb 09, 2020 14:57
I can confirm the same issue going from 2019.2 to .3. The workaround referenced at https://answers.unity.com/questions/1696517/20193-unityengineui-and-vs-code.html worked for me as well.
studentutu
Feb 06, 2020 09:38
Also in the release 2019.3 - here is a quick workaround - https://answers.unity.com/questions/1696517/20193-unityengineui-and-vs-code.html