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

    Jan 27, 2020 04:58

    Happened on my Mac, unity 2019.2.9f1. After I reimport/delete the library folder/played with google firebase package, the EventSystem error pops out. Fix it by use TimeMachine to remove whole project folder in my case.

  2. snoche

    Jan 23, 2020 19:11

    2019.3.0f5
    same issue, neither deleting library, reimporting all or reinstalling packages works

  3. FoxUmkov_POP

    Jan 20, 2020 10:33

    The following helped me:
    - downloaded the Unity installer from the site (2019.2.17 my version)
    - installed a new studio from it (Visual Studio Community 19)
    - opened a C # project in MVS 19 via Menu / Open C # Project
    - the error is gone

  4. depaglia

    Jan 17, 2020 15:52

    I'm using Unity 2019.2.8f1 and after updating Cinemachine from 2.3.4 to 2.4.0 preview 10, Omnisharp stopped recognizing the UnityEngine.UI namespace completely, throwing errors on its classes (Button, Text, Slider, etc), also affecting the TMPro namespace. When I reverted Cinemachine to its previous version, Omnisharp resumed working properly.

  5. savantedroid

    Jan 15, 2020 06:10

    2019.3.0f3 same issue

  6. dimgl

    Jan 10, 2020 09:59

    The only thing that worked for me was Genrysss comment on Jul 25, 2019.

    0. I made a backup of my project.
    1. I upgraded to the prerelease version.
    2. Deleted my Library folder.
    3. Deleted my manifest.json file inside of the Packages folder.
    4. Deleted the Assembly-CSharp.csproj project.

    Then I opened Unity and Visual Studio Code. Everything seems to be back to normal for now.

    Honestly, this was a major pain. Spent several hours on this.

  7. dimgl

    Jan 09, 2020 18:55

    Just ran into this bug this morning. Happened when I move some folders over to a different directory. Really annoying because now Intellisense doesn't work in Visual Studio Code. Halp :( I restarted Omnisharp and no difference

  8. SammmZ

    Jan 08, 2020 02:11

    Same problem with Unity version 2019.3.0f3
    The compiler didn't recognize UnityEngine.UI in some random scripts.

    Why did Unity set this bug as "fixed" and "not reproducible" everywhere if literally all the comments below insist it still here?

  9. Mustellinus

    Jan 06, 2020 19:34

    This issue is not resolved. I have the same problem with Unity version 2019.3.0f3.

  10. AldhairV_15

    Dec 13, 2019 16:37

    Could someone solve the problem? i had the same issue and happened suddenly when i openned unity this morning.

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.