UI: The type or namespace name 'MaskableGraphic' could not be found

I successfully opened and built the project attached to Case 1108597 in Unity 2019.2.0b1 a few weeks ago.

Today I re-opened this project in 2019.2.0b7 and Unity now displays about 100 UI related compile errors:

F:\ProgramFiles\Unity_2019_2\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\UI\Core\Dropdown.cs(5,19): error CS0234: The type or namespace name 'EventSystems' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)

F:\ProgramFiles\Unity_2019_2\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\UI\Core\RawImage.cs(17,29): error CS0246: The type or namespace name 'MaskableGraphic' could not be found (are you missing a using directive or an assembly reference?)

F:\ProgramFiles\Unity_2019_2\Editor\Data\Resources\PackageManager\BuiltInPackages\com.unity.ugui\Runtime\UI\Core\Dropdown.cs(20,41): error CS0246: The type or namespace name 'IPointerClickHandler' could not be found (are you missing a using directive or an assembly reference?)

… and so on.

The UI package seems to be up-to-date:

What can I do to get rid of those com.unity.ugui related compile errors?

The error message mentions that unity.ugui is part of a built in package, possibly UI, not an additional one. You cannot remove built-in packages so the error could be not related to Unity UI. :slight_smile:

I closed the editor and opened the project again and now those compile errors vanished automagically. :face_with_spiral_eyes:

Do you still have the old project with the issue? If you could file a bug report that would be great :slight_smile:
Sounds like it could be the assemblies are not updating when opening the project.

Unity Technologies have the project, it’s attached to Case 1108597. I didn’t try to reproduce it, not sure if it always occurs when upgrading from 2019.2.0b1 to 2019.2.0b7.

As far as I could observe, the editor seems to generate random errors between editor restarts ( link ). Really weird behavior for me. In one session everything is fine, then you close the editor, open the same project 10 seconds later again and suddenly (sometimes only) there are errors for no obvious reason :face_with_spiral_eyes:

1 Like