How do I reference a UI text in Unity 5? (JS)

Hi,
I was using gui texture before upgrading to Unity 5 however they no longer work (and were pretty crappy anyway).

I’m not sure what the correct variable type the UI texture is in javascript (“Text” isn’t working)

var gui_ClipCount : Text;

How would I reference a UI text in a variable USING JAVASCRIPT?

Try using

import UnityEngine.UI;

at the beginning of your script. It saves you writing UI.* all the time.

Wow facepalm.

Unity even TOLD me what it was. It’s UI.Text, so it should be:

var gui_ClipCount : UI.Text;