Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

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,650
    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,650
    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,570
    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,650
    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.