You could simply test if the returned float differs from the value float and if so hide the cursor using Screen.showCursor = false; ... and then show it again only when the mouse button is no longer pressed. Ex - in OnGUI: Code (csharp): float oldValue; oldValue = value; value = GUI.VerticalSlider( sliderRect, value, topValue, bottomValue ); if( value != oldValue ) { hiddenByGUI = true; Screen.showCursor = false; } and in Update: Code (csharp): if( hiddenByGUI !Input.GetMouseButton( 0 ) ) { hiddenByGUI = false; Screen.showCursor = true; }