|
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:
So what do I write instead of showCursor?
(comments are locked)
|
Just make sure the animation is set to ClampForever wrap mode. Or just Screen.showCursor = !YourCamera.animation.isPlaying; :)
Mar 28 '11 at 12:20 PM
Statement ♦♦
Wouldn't ClampForever make isPlaying never to return false?
Mar 28 '11 at 12:21 PM
Statement ♦♦
(comments are locked)
|
CursorHide.jsPut this on your camera, and edit the animation name to your animation name.
CustomCursor.js
Here's a textual step explaination of what goes on.
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. 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?
Mar 28 '11 at 12:44 PM
Michael 20
Updated my code.
Mar 28 '11 at 01:02 PM
Statement ♦♦
This error is appearing: Unknown identifier: 'CustomCursor'.
Mar 28 '11 at 01:19 PM
Michael 20
Yeah, any idea why? It's because your cursor is in another script than CustomCursor.js. Just change CustomCursor to the name of your script that has the cursor.
Mar 28 '11 at 02:09 PM
Statement ♦♦
(comments are locked)
|
