how to get dice number in ui text

actually i m new in unity so,i dont knw how to update ui text.please help me guys

The component Explained:
http://docs.unity3d.com/ScriptReference/UI.Text.html

Code you can attach to the GameObject with the TextElement

using UnityEngine;
using UnityEngine.UI;

public class ChangeText : MonoBehaviour {

void Start(){
  GetComponent<Text>().text = "dice number";
}

}

Maybe you could apply a tag to each side, then retrieve that tag after the dice is “rolled”. I’m new to Unity and I’ve only completed my first game in it last night so I’m not sure, but that’s how I would initially approach it but there may be a better way to do it.