x


Disable a object

I want to disable a GUITexture object and later enable it. How do i do this using JavaScript?

more ▼

asked Jan 01 '10 at 04:55 PM

Mattivc gravatar image

Mattivc
1.7k 55 60 67

I removed the javascriptspecific tag. Though you ask for a solution in Javascript, the question and answer is relevant regardless of language choice.

Feb 17 '10 at 12:48 PM runevision ♦♦
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first
guiTexture.gameObject.active = false; //turn it off
guiTexture.gameObject.active = true; //turn it on
more ▼

answered Jan 01 '10 at 05:27 PM

flaminghairball gravatar image

flaminghairball
928 4 9 21

What if i want to disable a GUITexture other than the one the script is connected to?

Jan 01 '10 at 06:36 PM Mattivc

Just replace "guiTexture" with the texture you want to disable...

Jan 01 '10 at 11:06 PM Stelimar

I want to disable my Weapon. How?

Jan 02 at 02:58 PM Lost_C4
(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:

x3675
x476

asked: Jan 01 '10 at 04:55 PM

Seen: 2798 times

Last Updated: Jan 02 at 02:58 PM