Search code examples
unity-game-engineuser-interfacereferenceproject

Unity 2020.1.0f1 is missing UnityEngine.UI


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.


Solution

  • 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"