x


Make a Cursor Disappear?

How would I write a script to make a cursor disappear when I press a key on my keyboard and then reappear when I press that key again?

more ▼

asked Nov 12 '10 at 06:35 AM

buckethead3495 gravatar image

buckethead3495
52 11 11 16

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Hi,

Try something like this ( javascript )

function Update () {
  if ( Input.GetKeyDown ("space") ){
    Screen.showCursor = !Screen.showCursor;
  }
}

Hope it helps,

Jean

more ▼

answered Nov 12 '10 at 06:41 AM

Jean Fabre gravatar image

Jean Fabre
3.1k 68 74 103

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x5063
x198
x106

asked: Nov 12 '10 at 06:35 AM

Seen: 2188 times

Last Updated: Nov 12 '10 at 06:35 AM