'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 1:[1]
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"
Solution 2:[2]
Try this in Unity menu go to "Window > Package Manager" search "Unity UI". Install if not installed or remove and re install.
Solution 3:[3]
I've tried uninstalling and installing by both package manager and manifest and didn't work, it must be a bug.
Solution 4:[4]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Agustin0987 |
| Solution 2 | Mario |
| Solution 3 | Goty Metal |
| Solution 4 | Abdulkerim Yıldırım |

