Quantcast
Viewing latest article 2
Browse Latest Browse All 4

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( nameOfComponent ); component.enabled = true; //assuming default is false or if no collision/trigger event..find the gameObject first..and get component from that. var gObjectComponent : nameOfComponent; gObjectComponent = GameObject.Find("nameOfGameObjectWithComponent").GetComponent( nameOfComponent ); if( time >= 3seconds ) gObjectComponent.enabled = true; else gObjectComponent.enabled = false;

Viewing latest article 2
Browse Latest Browse All 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>