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

Scripting

-

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

Comments (15)

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

  2. yodda

    Mar 02, 2022 21:02

    it happened to me when I removed VS Code and stayed with visual studio 2019.

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

  4. 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?

  5. geraldp48

    Apr 02, 2020 14:15

    I am still experiencing this error upgrading to 2019.3.7f1

  6. 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)

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

  8. SammmZ

    Jan 08, 2020 01:58

    Still have the same error in 2019.3.0f3

  9. ZenUnity

    Jun 25, 2019 22:06

    This appears to be fixed in 2019.3.0a6

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.