The Swartz-Manning’s first exhibit will provide a detailed history of Aaron Swartz Day. https://www.aaronswartzday.org/vr
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

level_teleport.cs 516B

123456789101112131415161718192021
  1. using UnityEngine;
  2. using System.Collections;
  3. public class Teleport : MonoBehaviour
  4. {
  5. public bool restart = false;
  6. public string levelToLoad = "nameOfLevelToLoad";
  7. void OnTriggerEnter(Collider other)
  8. {
  9. if (other.tag == "Player")
  10. {
  11. if (restart)
  12. {
  13. Application.LoadLevel(Application.loadedLevel);
  14. }
  15. else
  16. {
  17. Application.LoadLevel(levelToLoad);
  18. }
  19. }
  20. }
  21. }