LoadSceneCollider.cs 228 B

12345678910111213
  1. using UnityEngine;
  2. using System.Collections;
  3. public class LoadSceneCollider : MonoBehaviour {
  4. public int level;
  5. void OnTriggerEnter (Collider other)
  6. {
  7. Debug.Log ("Loading Level");
  8. Application.LoadLevel(level);
  9. }
  10. }