OnMouseEnter (523761)

Hi guys, i have a small problem : In the script reference “MonoBehaviour.OnMouseEnter” has to be attached to the gameobject, but i my script i create a texture like this :
GUI.DrawTexture(Rect(123, 14, hpBarLength, 30), HpBarTexture);
And i want to apply OnMouseEnter to the texture, so how i do it ?

Thanks

Up

Don’t know if I am of much help but you should try explaining the situation better also in C#

void OnMouseEnter()
{
	GUI.DrawTexture(Rect(123, 14, hpBarLength, 30), HpBarTexture);
}

or in Javascript?

function OnMouseEnter()
{
	GUI.DrawTexture(Rect(123, 14, hpBarLength, 30), HpBarTexture);
}