void Awake() { _camera = this.GetComponent <Camera>(); if (_camera == null) { ObjUtil.SmartDestroy(this); } else { CameraManager.Register(this); } }
protected override void Awake() { base.Awake(); //_camera = this.GetComponent<Camera>(); //if (_camera == null) //{ // ObjUtil.SmartDestroy(this); //} //else //{ // CameraManager.Register(this); //} if (_camera != null) { CameraManager.Register(this); } }
protected override void Awake() { base.Awake(); CameraManager.Register(this); }
protected override void OnEnable() { base.OnEnable(); CameraManager.Register(this); }