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());
        }
예제 #3
0
        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;
                }
            }
        }
예제 #5
0
 static void Reset()
 {
     instance = null;
 }
 private void Awake()
 {
     this.OnValidate();
     this.havenRig = this.GetComponentInParent <HavenRig>();
 }