showing and hiding the cursor

Hello, at the moment i have the cursor hidden when playing my game using the Screen.showCursor = false; function. but i need to make it visible again when i roll over a gui and once i have clicked on the gui.

I have tried using Screen.showCursor = true; on a OnMouseOver function and some others, but to no avail.

Can anyone offer any assistance?

Post your code

.ORG

ok:

function Start(){
	Time.timeScale = 1;
}

function OnMouseDown (){
	
	Time.timeScale = 1-Time.timeScale;
	
	if (Time.timeScale <= 0.1){
	resume.show();
	quitToMenu.show();
	Screen.showCursor = true;
	}
	else{
		if (Time.timeScale == 1){
			resume.hide();
			quitToMenu.hide();
			Screen.showCursor = false;
		}
		
	}
}

function OnLevelWasLoaded (level : int){
	if(level == 10){
		Destroy (this);
	}
	if(level == 8){
		Destroy (this);
	}
	if(level == 9){
		Destroy (this);
	}
}

function OnMouseOver(){
	Screen.showCursor = true;
}

function Update(){
	Screen.showCursor = false;
}

In Update, you set Screen.showCursor to false; which means it’s being done every frame and overriding what your buttons are doing. Put Screen.showCursor=false in Start instead.

Ah cool. Yeah works now, what a noob.

Cheers.