private void Start() { if (this.IsOwner) { this.ShowVisuals(false); this.rig = HavenRig.GetRig(); } }
private IEnumerator Start() { // If we're the owner, then get a reference to the Rig while (this.IsOwner && this.havenRig == null) { this.havenRig = HavenRig.GetRig(); yield return(null); } yield return(this.InitializeAvatarCoroutine()); }
private void Initialize() { CoroutineRunner.Instance.StartCoroutine(Coroutine()); IEnumerator Coroutine() { yield return(HavenRig.WaitForRig()); var rig = HavenRig.GetRig(); rig.transform.position = this.transform.position; } }
private static void FixTeleports() { xrInteractionManagerInstance.StartCoroutine(Coroutine()); IEnumerator Coroutine() { yield return(HavenRig.WaitForRig()); var rig = HavenRig.GetRig(); var teleportProvider = rig.GetComponentInChildren <TeleportationProvider>(); foreach (var teleport in GameObject.FindObjectsOfType <BaseTeleportationInteractable>(true)) { teleport.teleportationProvider = teleportProvider; teleport.interactionManager = xrInteractionManagerInstance; } } }
static void Reset() { instance = null; }
private void Awake() { this.OnValidate(); this.havenRig = this.GetComponentInParent <HavenRig>(); }