Search Issue Tracker
Fixed in 2019.3.X
Fixed in 2019.2.X
Votes
0
Found in
2019.2.0a5
2019.2.0b1
2019.3.0a1
Issue ID
1154163
Regression
Yes
UnityEngine.UI reference is missing in Assembly Definition Assemblies and Plugins
To reproduce:
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?)"
Notes:
- 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
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
- [Dragon Crashers] Build fails in U6
- [Dragon Crashers] 4 Shader error messages on import
- [Dragon Crashers] Readme text is white on light grey
- Cursor stays in front of the first character when entering text in the TextMeshPro field
- Searching in Hierarchy causes unwanted component calls
yodda
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.
yodda
Mar 02, 2022 21:02
it happened to me when I removed VS Code and stayed with visual studio 2019.
Mouledoux
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.
victorbexiga
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?
geraldp48
Apr 02, 2020 14:15
I am still experiencing this error upgrading to 2019.3.7f1
Animetra
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)
Animetra
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.
samanabo
Jan 28, 2020 15:20
I was using VSCode and had some luck with this 'fix'
https://issuetracker.unity3d.com/issues/vscode-omnisharp-project-reference-warnings-are-thrown-in-vscode-console-when-using-vscode-1-dot-1-4
SammmZ
Jan 08, 2020 01:58
Still have the same error in 2019.3.0f3
ZenUnity
Jun 25, 2019 22:06
This appears to be fixed in 2019.3.0a6