show gui when look certain object

hi i want that when im look with the cursor a box (a generally mesh) a gui appear , and when im no longer look it the gui disappear i had try several way with no succes. wath is a correct way to do that?

Well, I'm not sure how your scene is set up. But you could do something like this:

BoxScript (place this onto your box)

static var GUIon : boolean = false;

function OnMouseOver(){
GUIon = true;

function OnMouseExit(){
GUIon = false;

GUIScript (place this onto a game empty in scene)

function OnGUI(){
if(BoxScript.GUIon == true){
GUI.Box(Rect(0,0,Screen.width,Screen.height),"Cursor Over Object");

yup the sistem is right wath i need thanks , i need to reply, then why this code

var im : GUITexture;

function OnGUI(){ if(showonbox.GUIon == true){ GUI.Box(Rect(0,0,Screen.width,Screen.height),im); } }

isnt correct? the debug tell me that dont have the approprieate engine for this..... i use the free this the problem?