how to show cursor on specific time?

Hi

I am making a menu for my game. Before the menu appears in the game, I made an animation to the camera. How can I make the mouse cursor appear after the camera finishes its animation?

I forgot to say that I am showing a custom texture cursor by using this script:

var cursorImage : Texture; 

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

function OnGUI() 
{ 
    var mousePos : Vector3 = Input.mousePosition; 
    var pos : Rect = Rect(mousePos.x, Screen.height - mousePos.y, cursorImage.width, cursorImage.height); 
    GUI.Label(pos,cursorImage); 
}

So what do I write instead of showCursor?

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

function Update(){
    if(!YourCamera.animation.isPlaying){
        Screen.showCursor = true;
    }
}

Just make sure the animation is set to ClampForever wrap mode.

CursorHide.js

Put this on your camera, and edit the animation name to your animation name.

function Start() 
{
    CustomCursor.showCursor = false;
    animation.Play("Intro");
    yield WaitForSeconds(animation["Intro"].length);
    CustomCursor.showCursor = true;
}

CustomCursor.js

var cursorImage : Texture; 
static var showCursor : boolean = true;

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

function OnGUI() 
{ 
    if (!showCursor) 
        return;

    var mousePos : Vector3 = Input.mousePosition; 
    var pos : Rect = Rect(mousePos.x, Screen.height - mousePos.y, cursorImage.width, cursorImage.height); 
    GUI.Label(pos,cursorImage); 
}

Here's a textual step explaination of what goes on.

  1. Disable your custom cursor by setting its static showCursor variable to false.
  2. Start an animation called "Intro".
  3. Wait for the animation to finish by waiting for the length of the clip.
  4. Enable your custom cursor again so it can render.

I added a static variable called showCursor to your existing script and in OnGUI, if it is not true we exit the function so we don't render any gui.