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
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.
genrysss
Jul 25, 2019 08:29
Remove Library folder from Project and open Project again resolved this issue.
Arkhar
Jun 17, 2019 22:54
Removing and re-adding UI in the package manager resolved this issue for me.
Arkhar
Jun 17, 2019 21:33
2019.3.0a4
Same problem
djsell
Jun 06, 2019 23:40
2019.3.0a5 is still suffering from this
leeprobert
Jun 04, 2019 19:45
2019.3.0a3 same issue when installing VRTK Beta 4
enichols
Jun 03, 2019 05:15
I'm having the same issue on 2019.3.0a3
lpt0
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.
lpt0
Jun 02, 2019 12:06
Same issue here.
rh_galaxy
Jun 01, 2019 10:45
So, it is reproducable. Not saying where the fault is, could be in 'Oculus Integration', but could be in later unity as well.