How do I change the UI text via scripting in Unity 2019.3?

I can’t do

  using UnityEngine.UI; 
 
 public Text scoreText;
 
 scoreText.text = scoreManager.GetScore().ToString();

anymore because “Unnecessary using directive. [Assembly-CSharp]csharp(CS8019) The type or namespace name ‘UI’ does not exist in the namespace ‘UnityEngine’ (are you missing an assembly reference?)”. I have made sure Unity UI is installed in the package manager.

How do I change the Text component of a GameObject via scripting?

Hello.

i’m using same version, and this is how i do it.

And the error says the problem is the UnityEngine.UI

Try to reinstall Uniyt.