/// <summary> /// Refreshes the FPFC Variables. /// </summary> public void Refresh() { _firstPersonFlyingController = Resources.FindObjectsOfTypeAll <FirstPersonFlyingController>().FirstOrDefault(); _vrInputModule = _firstPersonFlyingController.GetField <VRInputModule, FirstPersonFlyingController>("_vrInputModule"); _camera = _firstPersonFlyingController.GetField <Camera, FirstPersonFlyingController>("_camera"); _vrInputModule.transform.SetParent(transform); if (_originalOriginLocation == null) { _originalOriginLocation = _firstPersonFlyingController.transform; } if (_helper.currentXRDeviceModel == XRDeviceModel.Unknown) { _camera.fieldOfView = _options.CameraFOV; } _firstPersonFlyingController.transform.SetParent(transform); _firstPersonFlyingController.SetField("_cameraFov", _options.CameraFOV); _firstPersonFlyingController.SetField("_moveSensitivity", _options.MoveSensitivity); _leftController = _firstPersonFlyingController.GetField <VRController, FirstPersonFlyingController>("_controller0"); _rightController = _firstPersonFlyingController.GetField <VRController, FirstPersonFlyingController>("_controller1"); }