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 (21)

  1. Ac0e496ea3b772760deeef80d826816d?d=mm

    nekokiller2012

    Nov 05, 2019 04:10

    Unity 2019.2.0f1 has the same issue.

  2. Bc03cc746d3778e18208a69e61c35a0c?d=mm

    Aiursrage2k

    Oct 06, 2019 00:57

    Just open a different version of unity, they screw something up every single time they release something

  3. Bc03cc746d3778e18208a69e61c35a0c?d=mm

    Aiursrage2k

    Oct 06, 2019 00:56

    Unity is BUGGY

  4. Ac1b59832920bbed55a8096534f5270b?d=mm

    PrimordialArtStudios

    Oct 01, 2019 22:40

    In the package manager go to Visual Studio Code Editor and update that, close and re-open Visual Studio and it should sort the problem.

  5. 16dda489ae50641b523b6481989c9c2d?d=mm

    _alia_

    Sep 18, 2019 17:01

    Setting Package type to "library" on a completely separate package caused this to happen for me

  6. 5a23279a3a2f1139b69c0843d5da10ad?d=mm

    Pixygon

    Sep 12, 2019 13:27

    Happening to me as well, on Unity 2019.2.5f1. Erasing Library, didn't help, and neither did to remove the UI package and reinstalling it again. Frustrating now!

  7. Af7cbe9df8ac67da71520dac51880549?d=mm

    raceprob

    Aug 24, 2019 18:13

    I got same error .
    2019.3.0a5

  8. 45a3f8bf2b04710c241cc0382f9690c6?d=mm

    smonroy-2S

    Aug 19, 2019 20:15

    This error just happened to me and should be re-opened again.

    Repro steps were:
    + Download and open this project: https://github.com/keijiro/Smrvfx
    + Open the project with Unity 2019.1.0f2.
    + Close the project.
    + Open the project again with Unity 2019.2.1f1 and allow upgrade.
    + All UnityEngine.UI references are now broken.

    This is one of the four similar Console errors I received:
    "C:\Program Files\Unity\Hub\Editor\2019.2.1f1\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\EventSystem\Raycasters\Physics2DRaycaster.cs(16,9): error CS0246: The type or namespace name 'RaycastHit2D' could not be found (are you missing a using directive or an assembly reference?)"

    And I am unable to import UnityEngine.UI in any of my scripts.

  9. 157c1dd7d9ce3e62fcef18fde9096864?d=mm

    genrysss

    Jul 25, 2019 08:29

    Remove Library folder from Project and open Project again resolved this issue.

  10. 97322c6c8c627e6bb00107f8164c55d9?d=mm

    Arkhar

    Jun 17, 2019 22:54

    Removing and re-adding UI in the package manager resolved this issue for me.

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.