Esempio n. 1
0
            protected override void OnStart()
            {
                base.OnStart();
                _Actor       = GetComponent <AGHActor>();
                _LeftHitomi  = (_Actor._Head.FindDescendant(new Regex("HitomiL")));
                _RightHitomi = (_Actor._Head.FindDescendant(new Regex("HitomiR")));

                if (!_LeftHitomi || !_RightHitomi)
                {
                    VRLog.Info("Hitomi Fail! " + name);
                    DestroyImmediate(this);
                }
            }
Esempio n. 2
0
        private IEnumerator UpdateActorsCoroutine()
        {
            _Actors = new IActor[0];
            if (SceneManager.GetActiveScene().name == "ADV")
            {
                yield break;
            }

            yield return(new WaitForSeconds(1f));

            _Actors = GameObject.FindObjectsOfType <Transform>().Where(t => t.name.Contains("HeadNub") && t.transform.position.magnitude < 40f).Select(headNub => AGHActor.Create(headNub)).ToArray();
            VRLog.Info(_Actors.Count() + " Actors found");
            foreach (var actor in _Actors.OfType <AGHActor>())
            {
                VRLog.Info(actor.name);
            }
        }