Quantcast
Viewing latest article 3
Browse Latest Browse All 42

Answer by seedoubleyou

First, of course, you have to set up tags on objects (for how, go here: [Unity tags Info][1]), After you set up your tag, you can access the name of the tag in an **OnTriggerEnter** function: function OnTriggerEnter(col : Collider) { if(col.gameObject.tag == "nameOfYourTag"){ //Do Something } } [1]: http://unity3d.com/support/documentation/Components/Tags.html

Viewing latest article 3
Browse Latest Browse All 42

Trending Articles



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