コード例 #1
0
 private void Start()
 {
     if (this.IsOwner)
     {
         this.ShowVisuals(false);
         this.rig = HavenRig.GetRig();
     }
 }
コード例 #2
0
        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;
            }
        }
コード例 #4
0
        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;
 }
コード例 #6
0
 private void Awake()
 {
     this.OnValidate();
     this.havenRig = this.GetComponentInParent <HavenRig>();
 }