public void CreateCamera() { HoverFollowCamera = Instantiate(prefab); HoverFollowCamera.SetLookAt(CameraLookAt); BearCamera = HoverFollowCamera.GetComponent <Camera>(); BearCamera.name = this.gameObject.name + " Camera"; BearCamera.rect = cameraRect; }
void Start() { m_body = GetComponent <Rigidbody>(); m_player = GetComponent <Player>(); HoverFollowCamera = Instantiate(prefab); HoverFollowCamera.SetLookAt(CameraLookAt); BearCamera = HoverFollowCamera.GetComponent <Camera>(); BearCamera.name = this.gameObject.name + " Camera"; BearCamera.rect = cameraRect; Animator = GetComponent <Animator>(); //camera = GameObject.Instantiate<GameObject>(CameraPrefab); }