Created
July 22, 2013 03:19
-
-
Save gskielian/6051105 to your computer and use it in GitHub Desktop.
How to load a level upon collision.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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