Don't forget to change your Library to the following:
Using UnityEngine.UI;
instead of
Using UnityEngine;
I'm new to Unity. And I hope it works.