Skip to content

Instantly share code, notes, and snippets.

@gskielian
Created July 22, 2013 03:19
Show Gist options
  • Save gskielian/6051105 to your computer and use it in GitHub Desktop.
Save gskielian/6051105 to your computer and use it in GitHub Desktop.
How to load a level upon collision.
#pragma strict
function OnTriggerEnter (col : Collider)
{
Application.LoadLevel(1); //loads level 1 when some object collides with this object's box-collider (added via the physics sub-menu)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment