Quantcast
Channel: Answers for "Can a script enable components?"
Browsing index pages (4 articles)
↧

Answer by DDelapena

just get the component from the gameObject and then set ".enabled" to true or false. on some kind of trigger event it could be like this: var component : nameOfComponent = collision.GetComponent(...

View Article


Answer by Eric5h5

Just use the .enabled property (if it exists for that component). GetComponent(Blah).enabled = true.

View Article


Answer by DDelapena

just get the component from the gameObject and then set ".enabled" to true or false. on some kind of trigger event it could be like this: var component : nameOfComponent = collision.GetComponent(...

View Article

Answer by Eric5h5

Just use the .enabled property (if it exists for that component). GetComponent(Blah).enabled = true.

View Article
Browsing index pages (4 articles)


Latest Images