The Swartz-Manning’s first exhibit will provide a detailed history of Aaron Swartz Day. https://www.aaronswartzday.org/vr
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

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. }