Unity 2020.1.0f1 is missing UnityEngine.UI

Viewed 4437

So I started a new project using Unity 2020.1.0f1 and for some reason I am having trouble finding some stuff:

  • The namespace "UnityEngine.UI" does not show up in code. (I use visual studio 2019 community).
  • In the add component menu of GameObjects, I can find the "Canvas" component, but none of its usual child components (i.e. Image, Button, Toggle, etc...)
  • In the Hierarchy Context Menu the "UI" section (which usually holds all the UI stuff such as Canvas, Button, etc...) is not showing up either.

I was wondering If the whole UnityEngine.UI system was deprecated? And if so, Why is "Canvas" still there, but in a different namespace (now is UnityEngine.Canvas)?

I was looking at the documentation, but it's only available until Unity 2019.x.

Thanks in advance for the help.

4 Answers

Try this in Unity menu go to "Window > Package Manager" search "Unity UI". Install if not installed or remove and re install.

Well I managed to fix it by manually adding the package to the manifest.json file located in the Packages folder. I added the following line to the list of packages in the manifest:

"com.unity.ugui": "1.0.0" 

I've tried uninstalling and installing by both package manager and manifest and didn't work, it must be a bug.

In Unity go to Edit > Preferences.. > External Tools and click regenerate project files is work

regenerate project files

Related