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

Scripting

-

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

Comments (64)

  1. tomatohorse

    Apr 02, 2020 19:54

    Thank you BENFC1993, your solution worked for me!

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

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

  4. 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!

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

  6. JackTR55555

    Mar 17, 2020 06:03

    I have the same issue in 2019.3.0f6 PLEASEEEE!!!!

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

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

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

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

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.