Search Issue Tracker

Fixed in Unity 2019.3

Votes

0

Found in

2019.2.0b1

Issue ID

1154163

Regression

Yes

UnityEngine.UI reference is missing in Assembly Definition Assemblies and Plugins

Scripting

-

-

Priority: 2Necessary for shipping a final release

-

Severity: 2Core functionality majorly impacted

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

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

  2. 3bb3f461f93ea3a3b40a29d18500a8dc?d=mm

    ZenUnity

    Jun 06, 2019 17:26

    Still not working in 2019.3.0a5 even though it says it's fixed.

  3. Aca6559bd73450bad86678bfd3979c2c?d=mm

    armariya

    Jun 05, 2019 11:29

    I still has issue in 2019.2.0b4 even if it said already fix

  4. 036c983ef13155bb68184b917a0ac3df?d=mm

    leeprobert

    Jun 04, 2019 19:47

    I still see this error in 2019.3.0 when installing VRTK4 Beta

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.