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

  1. Af7cbe9df8ac67da71520dac51880549?d=mm

    raceprob

    Aug 24, 2019 18:13

    I got same error .
    2019.3.0a5

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

  3. 157c1dd7d9ce3e62fcef18fde9096864?d=mm

    genrysss

    Jul 25, 2019 08:29

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

  4. 97322c6c8c627e6bb00107f8164c55d9?d=mm

    Arkhar

    Jun 17, 2019 22:54

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

  5. 97322c6c8c627e6bb00107f8164c55d9?d=mm

    Arkhar

    Jun 17, 2019 21:33

    2019.3.0a4
    Same problem

  6. 1222ff6270048c9a0d08303721786c3e?d=mm

    djsell

    Jun 06, 2019 23:40

    2019.3.0a5 is still suffering from this

  7. 036c983ef13155bb68184b917a0ac3df?d=mm

    leeprobert

    Jun 04, 2019 19:45

    2019.3.0a3 same issue when installing VRTK Beta 4

  8. E182cae24fa373e710dcde7b0b0ca05c?d=mm

    enichols

    Jun 03, 2019 05:15

    I'm having the same issue on 2019.3.0a3

  9. 8241e84d269149192dc1a67e63624456?d=mm

    Bubiluminati

    Jun 02, 2019 12:09

    In my case Visual Studio 2017 underlines every usage of a UnityEngine.UI class in red, what is very irritating, but Unity 2019.3.0a3 compiles it without any errors.

  10. 8241e84d269149192dc1a67e63624456?d=mm

    Bubiluminati

    Jun 02, 2019 12:06

    Same issue here.

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.