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

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 (13)

  1. 669741ab71fdb5367626274baf5bc606?d=mm

    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.

  2. 6b773cce473423370d67835cd20fc667?d=mm

    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?

  3. 70ce7b009114a427a051ba3b70c55c90?d=mm

    geraldp48

    Apr 02, 2020 14:15

    I am still experiencing this error upgrading to 2019.3.7f1

  4. 673101a86c300d84324927f46c4b5b04?d=mm

    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)

  5. 673101a86c300d84324927f46c4b5b04?d=mm

    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.

  6. 6abdb60131b63dd460b3a6629427ad55?d=mm

    pigglet

    Jan 08, 2020 01:58

    Still have the same error in 2019.3.0f3

  7. 3bb3f461f93ea3a3b40a29d18500a8dc?d=mm

    ZenUnity

    Jun 25, 2019 22:06

    This appears to be fixed in 2019.3.0a6

  8. E72bf0515f288873b012f7b14769f125?d=mm

    Mrgove10

    Jun 19, 2019 18:39

    This error also appears on 2019.3.0a3 when installing graphy !

  9. 9f98cf164ab8ae9c2a496301c19b4c71?d=mm

    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.

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.