void Awake() { if (Instance == null) { Instance = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } }
//void Start () {} void Awake() { switch (handType) { case (HandType.LeftHand): if (TauController.LeftHand == null) { TauController.SetLeftHand(this); } else { Debug.Log("TauController.LeftHand is already set, ignoring duplicate"); } break; case (HandType.RightHand): if (TauController.RightHand == null) { TauController.SetRightHand(this); } else { Debug.Log("TauController.RightHand is already set, ignoring duplicate"); } break; case (HandType.AppItem): if (TauController.AppItem == null) { TauController.SetAppItem(this); } else { Debug.Log("TauController.AppItem is already set, ignoring duplicate"); } break; } }