Text Label on an existing button [C#]

Hi Every body !
i’m creating a little game and i want to create some buttons to upgrade the player. So i create the button and the script and it work but, i just want to make a pop up with what you will upgrade ( when the mouse is over the button, a text appear and say “lvl 1 => 2 : Cooldown - 2 secs” (for exemple) but it didn’t work …
this is my scripts :

using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class TextDisplay : MonoBehaviour {

public Text myText;
public bool displayInfo = false;

void Start(){
	myText.enabled = false;
}

void Update(){
	if (displayInfo == true) {
		myText.enabled = true;
	}
	if (displayInfo == false) {
		myText.enabled = false;
	}
}

void OnMouseOver()
{
	displayInfo = true;

}

void OnMouseExit()

{
	displayInfo = false;

}

}

Thank you, that read my question !
Bye, xyHeat

I just assume you’re trying that with a UI Button. If so, the script does not work because the methods you’re using are for collider2D with trigger and shouldn’t be used (as suggested by Unity themselves). The easiest way to do this is to add the “Event Trigger” component to the button. Add 2 new event types, Pointer Enter and Pointer Exit. Drag the button itself into each object slot. Rename the two methods to something else and make them public. In both event triggers select the corresponding methods in the dropdown.
Now, it should work