/// @endcond private void InitDevice() { if (device != null) { device.Destroy(); } device = BaseVRDevice.GetDevice(); device.Init(); List <string> diagnostics = new List <string>(); NativeDistortionCorrectionSupported = device.SupportsNativeDistortionCorrection(diagnostics); if (diagnostics.Count > 0) { Debug.LogWarning("Built-in distortion correction disabled. Causes: [" + String.Join("; ", diagnostics.ToArray()) + "]"); } diagnostics.Clear(); NativeUILayerSupported = device.SupportsNativeUILayer(diagnostics); if (diagnostics.Count > 0) { Debug.LogWarning("Built-in UI layer disabled. Causes: [" + String.Join("; ", diagnostics.ToArray()) + "]"); } if (DefaultDeviceProfile != null) { device.SetDefaultDeviceProfile(DefaultDeviceProfile); } device.SetAlignmentMarkerEnabled(enableAlignmentMarker); device.SetSettingsButtonEnabled(enableSettingsButton); device.SetVRBackButtonEnabled(backButtonMode != BackButtonModes.Off); device.SetShowVrBackButtonOnlyInVR(backButtonMode == BackButtonModes.OnlyInVR); device.SetDistortionCorrectionEnabled(distortionCorrection == DistortionCorrectionMethod.Native && NativeDistortionCorrectionSupported); device.SetTapIsTrigger(tapIsTrigger); device.SetNeckModelScale(neckModelScale); device.SetAutoDriftCorrectionEnabled(autoDriftCorrection); device.SetElectronicDisplayStabilizationEnabled(electronicDisplayStabilization); device.SetVRModeEnabled(vrModeEnabled); device.UpdateScreenData(); }
/// @endcond private void InitDevice() { if (device != null) { device.Destroy(); } device = BaseVRDevice.GetDevice(); device.Init(); List <string> diagnostics = new List <string>(); NativeDistortionCorrectionSupported = device.SupportsNativeDistortionCorrection(diagnostics); if (diagnostics.Count > 0) { Debug.LogWarning("Built-in distortion correction disabled. Causes: [" + String.Join("; ", diagnostics.ToArray()) + "]"); } diagnostics.Clear(); NativeUILayerSupported = device.SupportsNativeUILayer(diagnostics); if (diagnostics.Count > 0) { Debug.LogWarning("Built-in UI layer disabled. Causes: [" + String.Join("; ", diagnostics.ToArray()) + "]"); } if (DefaultDeviceProfile != null) { device.SetDefaultDeviceProfile(DefaultDeviceProfile); } device.SetDistortionCorrectionEnabled(distortionCorrection == DistortionCorrectionMethod.None && //Fix NativeDistortionCorrectionSupported); // device.SetDistortionCorrectionEnabled (false); //Fix device.SetNeckModelScale(neckModelScale); #if !UNITY_HAS_GOOGLEVR || UNITY_EDITOR device.SetVRModeEnabled(vrModeEnabled); #endif // !UNITY_HAS_GOOGLEVR || UNITY_EDITOR device.UpdateScreenData(); }
/// @endcond private void InitDevice() { if (device != null) { device.Destroy(); } device = BaseVRDevice.GetDevice(); device.Init(); List <string> diagnostics = new List <string>(); NativeDistortionCorrectionSupported = device.SupportsNativeDistortionCorrection(diagnostics); if (diagnostics.Count > 0) { Debug.LogWarning("Built-in distortion correction disabled. Causes: [" + String.Join("; ", diagnostics.ToArray()) + "]"); } diagnostics.Clear(); NativeUILayerSupported = device.SupportsNativeUILayer(diagnostics); if (diagnostics.Count > 0) { Debug.LogWarning("Built-in UI layer disabled. Causes: [" + String.Join("; ", diagnostics.ToArray()) + "]"); } if (DefaultDeviceProfile != null) { device.SetDefaultDeviceProfile(DefaultDeviceProfile); } device.SetDistortionCorrectionEnabled(distortionCorrection == DistortionCorrectionMethod.Native && NativeDistortionCorrectionSupported); device.SetNeckModelScale(neckModelScale); device.SetElectronicDisplayStabilizationEnabled(electronicDisplayStabilization); device.SetVRModeEnabled(vrModeEnabled); device.UpdateScreenData(); }
private void InitDevice() { if (device != null) { device.Destroy(); } device = BaseVRDevice.GetDevice(); device.Init(); List <string> diagnostics = new List <string>(); NativeDistortionCorrectionSupported = device.SupportsNativeDistortionCorrection(diagnostics); if (diagnostics.Count > 0) { Debug.LogWarning("Built-in distortion correction disabled. Causes: [" + String.Join("; ", diagnostics.ToArray()) + "]"); } diagnostics.Clear(); NativeUILayerSupported = device.SupportsNativeUILayer(diagnostics); if (diagnostics.Count > 0) { Debug.LogWarning("Built-in UI layer disabled. Causes: [" + String.Join("; ", diagnostics.ToArray()) + "]"); } device.SetVRModeEnabled(vrModeEnabled); device.SetDistortionCorrectionEnabled(distortionCorrection && NativeDistortionCorrectionSupported); device.SetAlignmentMarkerEnabled(enableAlignmentMarker && NativeUILayerSupported); device.SetSettingsButtonEnabled(enableSettingsButton && NativeUILayerSupported); device.SetNeckModelScale(neckModelScale); device.SetAutoDriftCorrectionEnabled(autoDriftCorrection); device.UpdateScreenData(); }
private void InitDevice() { if (device != null) { device.Destroy(); } device = BaseVRDevice.GetDevice(); device.Init(); List<string> diagnostics = new List<string>(); NativeDistortionCorrectionSupported = device.SupportsNativeDistortionCorrection(diagnostics); if (diagnostics.Count > 0) { Debug.LogWarning("Built-in distortion correction disabled. Causes: [" + String.Join("; ", diagnostics.ToArray()) + "]"); } diagnostics.Clear(); NativeUILayerSupported = device.SupportsNativeUILayer(diagnostics); if (diagnostics.Count > 0) { Debug.LogWarning("Built-in UI layer disabled. Causes: [" + String.Join("; ", diagnostics.ToArray()) + "]"); } if (DefaultDeviceProfile != null) { device.SetDefaultDeviceProfile(DefaultDeviceProfile); } device.SetVRModeEnabled(vrModeEnabled); device.SetDistortionCorrectionEnabled(distortionCorrection && NativeDistortionCorrectionSupported); device.SetAlignmentMarkerEnabled(enableAlignmentMarker && NativeUILayerSupported); device.SetSettingsButtonEnabled(enableSettingsButton); device.SetTapIsTrigger(tapIsTrigger); device.SetNeckModelScale(neckModelScale); device.SetAutoDriftCorrectionEnabled(autoDriftCorrection); device.UpdateScreenData(); }
/// @endcond private void InitDevice() { if (device != null) { device.Destroy(); } device = BaseVRDevice.GetDevice(); device.Init(); List<string> diagnostics = new List<string>(); NativeDistortionCorrectionSupported = device.SupportsNativeDistortionCorrection(diagnostics); if (diagnostics.Count > 0) { Debug.LogWarning("Built-in distortion correction disabled. Causes: [" + String.Join("; ", diagnostics.ToArray()) + "]"); } diagnostics.Clear(); NativeUILayerSupported = device.SupportsNativeUILayer(diagnostics); if (diagnostics.Count > 0) { Debug.LogWarning("Built-in UI layer disabled. Causes: [" + String.Join("; ", diagnostics.ToArray()) + "]"); } if (DefaultDeviceProfile != null) { device.SetDefaultDeviceProfile(DefaultDeviceProfile); } device.SetDistortionCorrectionEnabled(distortionCorrection == DistortionCorrectionMethod.Native && NativeDistortionCorrectionSupported); device.SetNeckModelScale(neckModelScale); device.SetVRModeEnabled(vrModeEnabled); device.UpdateScreenData(); }
/// @endcond private void InitDevice() { if (device != null) { device.Destroy(); } device = BaseVRDevice.GetDevice(); device.Init(); List<string> diagnostics = new List<string>(); NativeDistortionCorrectionSupported = device.SupportsNativeDistortionCorrection(diagnostics); if (diagnostics.Count > 0) { Debug.LogWarning("Built-in distortion correction disabled. Causes: [" + String.Join("; ", diagnostics.ToArray()) + "]"); } diagnostics.Clear(); NativeUILayerSupported = device.SupportsNativeUILayer(diagnostics); if (diagnostics.Count > 0) { Debug.LogWarning("Built-in UI layer disabled. Causes: [" + String.Join("; ", diagnostics.ToArray()) + "]"); } if (DefaultDeviceProfile != null) { device.SetDefaultDeviceProfile(DefaultDeviceProfile); } device.SetAlignmentMarkerEnabled(enableAlignmentMarker); device.SetSettingsButtonEnabled(enableSettingsButton); device.SetVRBackButtonEnabled(backButtonMode != BackButtonModes.Off); device.SetShowVrBackButtonOnlyInVR(backButtonMode == BackButtonModes.OnlyInVR); device.SetDistortionCorrectionEnabled(distortionCorrection == DistortionCorrectionMethod.Native && NativeDistortionCorrectionSupported); device.SetNeckModelScale(neckModelScale); device.SetAutoDriftCorrectionEnabled(autoDriftCorrection); device.SetElectronicDisplayStabilizationEnabled(electronicDisplayStabilization); device.SetVRModeEnabled(vrModeEnabled); device.UpdateScreenData(); }