Skip to content

Instantly share code, notes, and snippets.

@phoenixperry
Last active December 25, 2015 00:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phoenixperry/6889013 to your computer and use it in GitHub Desktop.
Save phoenixperry/6889013 to your computer and use it in GitHub Desktop.
Unity c# example of OnTriggerEnter
void OnTriggerEnter (Collider myTrigger) {
if(myTrigger.gameObject.name == "box"){
Debug.Log("Box went through!");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment