Exemplo n.º 1
0
    /// @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();
    }
Exemplo n.º 2
0
    /// @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();
    }
Exemplo n.º 3
0
    /// @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();
    }
Exemplo n.º 4
0
    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();
    }
Exemplo n.º 5
0
    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();
    }
Exemplo n.º 6
0
    /// @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();
    }
Exemplo n.º 7
0
  /// @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();
  }