gui question

Could someone give a small example on how to make a simple gui horizontal slider. I can’t get it to work. Here’s what I tried:

var value = 1.0;
var minValue = 0.0;
var maxValue = 3.0;

function OnGUI ()
{
	GUI.HorizontalSlider (Rect (20, 20, 300, 30), value, minValue, maxValue);
}

Do I have to make the value variable equal to the mouse position, or something?

Thanks

There’s actually a demo of an RGB slider in the compound components section of the Unity doco IIRC
cheers
Shaun

thanks