Crosshair disappears?

I have a script for my crosshair texture to follow my mouse. And when I build my game it works. But the problem is, after I hit space without moving my mouse the crosshair disappears. After I move the cursor around a bit it re-appears. How can I get it to show without disappearing?


var crosshairTexture : Texture2D;

function Start() {
    Screen.showCursor = false;

function OnGUI () {
    var mousePos = Event.current.mousePosition;
    GUI.DrawTexture( Rect( mousePos.x - (crosshairTexture.width/2),
                           mousePos.y - (crosshairTexture.height/2),
                           crosshairTexture.height), crosshairTexture);

Wild guess: hitting a key might fire an event with a null mouse position, which causes your cursor to be drawn offscreen or not at all. Try using Input.mousePosition instead of Event.current.mousePosition and see if that helps. (IIRC you may have to reverse the Y axis, but I could be wrong on that one.)

I realize this isn't much help, but it is at least a data point: I tried your script on my machine, and the problem isn't occurring here. I'm using Unity 3.1.0f4 on Mac OS X 10.6.6.