Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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

Discussion in '2019.2 Beta' started by Peter77, Jul 3, 2019.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,589
    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:
    Code (CSharp):
    1. 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?)
    2.  
    3. 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?)
    4.  
    5. 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:
    upload_2019-7-3_17-19-54.png

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

    Deleted User

    Guest

    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. :)
     
  3. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,589
    I closed the editor and opened the project again and now those compile errors vanished automagically. :confused:
     
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,227
    Do you still have the old project with the issue? If you could file a bug report that would be great :)
    Sounds like it could be the assemblies are not updating when opening the project.
     
  5. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,589
    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 :confused:
     
    karl_jones likes this.