Search Issue Tracker
Fixed in 2019.3
Fixed in 2019.2
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
- AssetDatabase is overwriting GUIDs
- Packages cannot be added from a registry that returns invalid publish dates [Windows-only]
- [PLM] OpenRL 501 error is thrown/editor crashes when baking 4K lightmaps with 16 lightmap AA samples
- Physics.SyncColliderTransforms syncs every collider when the local position hasn't changed
- [GPU PLM] Part of baked shadows are broken when hitting a backface
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
pigglet
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
Mrgove10
Jun 19, 2019 18:39
This error also appears on 2019.3.0a3 when installing graphy !
sebialex
Jun 07, 2019 05:19
I am still encountering the issue in version 2019.3.0a5.
Looking at the files:
In my .csproj file the old UI dll (from 2019.2.0a11) entry would look like this:
<Reference Include="UnityEngine.UI">
<HintPath>C:/Program Files/Unity/Hub/Editor/2019.2.0a11/Editor/Data/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll</HintPath>
</Reference>
If we go look into the same path in the 2019.3.0a5 path, the GUISystem folder under .../Editor/Data/UnityExtensions/Unity/ is missing.
If I copy it manually from the old version (2019.2.0a11) into the new (2019.3.0a5) and restart Unity I get these kind of errors:
Library\PackageCache\com.unity.textmeshpro@2.0.1\Scripts\Runtime\TMP_Dropdown.cs(170,16): error CS0433: The type 'Image' exists in both 'Unity.ugui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' and 'UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
Got a similar errors with the analytics. So I uninstalled the the 'com.unity.analytics' and 'com.unity.textmeshpro' and now the project builds. But the UI is not showing. Nothing on the UI canvas.
Had to revert back to 2019.2.0a11.