Having problem using Shapes in Unity 2019.4.16f1 Android platform (The type or namespace name 'VisualElement' could not be found)

Avatar
  • updated
  • Unity's Fault

Image 318

Hi Freya! I got a long long list of the same error about missing assemblies right after I import Shapes to my project. I imported everything of Shapes.

I use Unity 2019.4.16f1, Android platform, Shapes version 3.1.1(I think... because I just downloaded it from asset store)

Error examples:

Library\PackageCache\com.unity.package-manager-ui@2.0.13\Editor\Sources\UI\PackageDetails.cs(665,18): error CS0246: The type or namespace name 'VisualElement' could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.unity.package-manager-ui@2.0.13\Editor\Sources\UI\PackageDetails.cs(666,18): error CS0246: The type or namespace name 'Button' could not be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.unity.package-manager-ui@2.0.13\Editor\Sources\UI\PackageDetails.cs(27,26): error CS0246: The type or namespace name 'VisualElement' could not be found (are you missing a using directive or an assembly reference?)Library\PackageCache\com.unity.package-manager-ui@2.0.13\Editor\Sources\UI\Common\LoadingSpinner.cs(2,32): error CS0234: The type or namespace name 'UIElements' does not exist in the namespace 'UnityEngine.Experimental' (are you missing an assembly reference?)

Reporting a bug? please specify Unity version:
2019.4.16f1
Reporting a bug? please specify Shapes version:
3.1.1
Reporting a bug? please specify Render Pipeline:
Built-in render pipeline
Pinned replies
Avatar
Freya Holmér creator
  • Answer
  • Unity's Fault

this is a Unity bug where it doesn't properly handle package dependencies from 2018.x in 2019.x

the solution is to open the package manager and remove the "package manager UI" package, as it is incorrectly imported and isn't needed in 2019.x

Avatar
sunny

I removed Shapes folder, but the errors are still there. Is that Shapes edited some of my configurations in Unity? 

Avatar
sunny

I changed my manifest.json file to before I import Shapes. Then the errors are gone. 

Avatar
Freya Holmér creator
  • Answer
  • Unity's Fault

this is a Unity bug where it doesn't properly handle package dependencies from 2018.x in 2019.x

the solution is to open the package manager and remove the "package manager UI" package, as it is incorrectly imported and isn't needed in 2019.x

Avatar
sunny

Thanks Freya! Removing "package manager UI" package solved most of the errors!

And after I removed that, there are still two errors about (error blow)

So I removed "com.unity.2d.pixel-perfect": "1.0.1-preview", and the errors are gone.

Library\PackageCache\com.unity.2d.pixel-perfect@1.0.1-preview\Runtime\PixelPerfectCamera.cs(173,13): error CS0234: The type or namespace name 'PixelPerfectRendering' does not exist in the namespace 'UnityEngine.Experimental.U2D' (are you missing an assembly reference?)