Beispiel #1
0
        protected override void Awake()
        {
            base.Awake();

            if (_camera != null)
            {
                CameraPool.Register(this);
            }
        }
Beispiel #2
0
        protected override void Awake()
        {
            base.Awake();

            CameraPool.Register(this);

            _stateMachine = TypedStateMachine <Camera> .CreateFromParentComponentSource(this.gameObject, false, false);

            _stateMachine.StateChanged += this.OnStateChanged;
        }
Beispiel #3
0
        private bool AnyNonUnityCamerasContains(Camera c)
        {
            var e = CameraPool.GetEnumerator();

            while (e.MoveNext())
            {
                if (!(e.Current is UnityCamera) && e.Current.Contains(c))
                {
                    return(true);
                }
            }
            return(false);
        }
        protected override void Awake()
        {
            base.Awake();

            //_camera = this.GetComponent<Camera>();
            //if (_camera == null)
            //{
            //    ObjUtil.SmartDestroy(this);
            //}
            //else
            //{
            //    CameraManager.Register(this);
            //}


            if (_camera != null)
            {
                CameraPool.Register(this);
            }
        }
        protected override void OnDestroy()
        {
            base.OnDestroy();

            CameraPool.Unregister(this);
        }
Beispiel #6
0
 public void ForceSyncTaggedMainCamera()
 {
     _main           = CameraPool.FindTaggedMainCamera();
     _overrideAsNull = false;
 }
Beispiel #7
0
        protected override void Awake()
        {
            base.Awake();

            CameraPool.Register(this);
        }