Search Issue Tracker
Fixed in 2019.3.X
Fixed in 2019.2.X
UnityEngine.UI reference is missing in Assembly Definition Assemblies and Plugins
1. Download attached “UnityUIReference.zip" project and open in Unity
2. Open Console window
Expected results: There is no Error
Actual results: There is Error:
"Assets/AsmDef/Test.cs(1,19): error CS0234: The type or namespace name 'UI' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)"
- This issue appears both on Windows and macOS
- Notice how UnityEngine.UI resolves properly with a normal Script (Assets/Test.cs)
- Notice how UnityEngine.UI fails to resolve in the Script placed under an Assembly Definition (Assets/AsmDef/Test.cs)
Reproduced on Unity 2019.2.0a5, 2019.2.0b2 and 2019.3.0a3
Not reproduced on Unity 2019.2.0a4
Regression on Unity 2019.2.0a5
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Sprite Preview is broken when the Sprite is too tall or too wide
- Objects are invisible in Scene view when using Wireframe Shading Mode
- The property of a component becomes read-only when it is bound to "PropertyStreamHandle"
- Physics.Raycast does not work when used on the whole model
- Shader Graph changes the Position of Prefab instances in Play mode
Mar 02, 2022 21:08
it happened to me when I removed VS Code and stayed with visual studio 2019. I'm using 2021.2.10f
so TextMesh pro and UI do not Exist anymore. I think VS-Code Took the libraries out from visual studio 2019 during uninstalling altogether.
Mar 02, 2022 21:02
it happened to me when I removed VS Code and stayed with visual studio 2019.
Aug 29, 2020 19:48
I am still having this issue with 2019.4.1f1
No 3rd party packages are installed, just the new Input System, and URP.
I was able to fix it with Edit > Preferences.. > External Tools and regenerating .csproj files for everything.
It's only ever UnityEngine.UI that gets lost.
Apr 05, 2020 16:59
Impressionante como este tipo de problema é recorrente na Unity! As vezes dá vontade até mesmo de desistir! O problema continua nas versões mais novas! Qual é o problema de vocês?
Apr 02, 2020 14:15
I am still experiencing this error upgrading to 2019.3.7f1
Jan 29, 2020 00:22
...the issue re-appears always when I create a new C#-script inside one of my project folders. Could be fixed the same way (downgrade to VSCode package 1.1.3, close Unity, open it again and upgrade to 1.1.4)
Jan 29, 2020 00:10
upgraded to 2019.3.0f6 and had the same issue with VSCode. Fixed it by downgrading the VSCode package to 1.1.3 and then back to 1.1.4.
Jan 28, 2020 15:20
I was using VSCode and had some luck with this 'fix'
Jan 08, 2020 01:58
Still have the same error in 2019.3.0f3
Jun 25, 2019 22:06
This appears to be fixed in 2019.3.0a6