Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to deactivate an GameObject when a certain variable reaches a certain value. It is an imported FBX and doesnt have a MeshRenderer. I'm trying to stop it now with TheGameObject.gameObject.activate = false; then nothing happens.

Is there any other way to do this or fix this?

share|improve this question

The property is active, not activate. And you can try using SetActiveRecursively if your game object has multiple child objects. Just setting the active flag doesn't set the active flags of child objects.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.