Missing UnityEngine.UI

If you are getting the following error while opening a Untiy project:

unity error CS0234: The type or namespace name 'UI' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)

Then you just need to add the “Unity Ui” Package in the Unity Package manager.