x


Make An Object Invisable till turn on

I want to make it so that the fernature in my room is invisable unitll the a GUI button is pressed. How would i go about changing the visability of an item off and on?

more ▼

asked May 29 '12 at 06:22 PM

Davidflynn gravatar image

Davidflynn
61 22 49 55

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

1 answer: sort voted first

Just enable and disable the renderer if you want it to still have scripts running, or use active if you don't. Bear in mind that you need to store references to objects that you deactivate as they are hard to find later:

  myChair.renderer.enabled = false;

Or

  myChair.active = false;

Or if this object has children that should also become inactive

  myChair.setActiveRecursively(false);
more ▼

answered May 29 '12 at 06:30 PM

whydoidoit gravatar image

whydoidoit
33k 11 23 98

(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:

x255

asked: May 29 '12 at 06:22 PM

Seen: 267 times

Last Updated: May 29 '12 at 06:30 PM