Switching from VR mode to 2D mode stretches EVERYTHNG.

Hi. I have been trying to implement GVR sdk in unity. My unity version is 5.6.0 and my GVR sdk version is 1.130.1. I am currently running the app on an android device. I have tried it on 4 different devices, still the same result. This is the configuration of VR setting in my player settings. Under cardboard settings I have tried all possible Depth formats (16-bit depth, 24 bit depth, and 24-bit depth | 8-bit stencil), but still get the same reults.
![alt text][1]


The app starts in 2D mode. When it starts it looks like this:
![alt text][2]


When I touch the cardboard button on top, the app switches to VR mode using the following code from google documentations (Building hybrid apps in Unity  |  Google VR  |  Google for Developers)

// Call via `StartCoroutine(SwitchToVR())` from your code. Or, use
// `yield SwitchToVR()` if calling from inside another coroutine.
IEnumerator SwitchToVR() {
  // Device names are lowercase, as returned by `XRSettings.supportedDevices`.
  string desiredDevice = "cardboard"; // Or "cardboard".

  // Some VR Devices do not support reloading when already active, see
  // https://docs.unity3d.com/ScriptReference/XR.XRSettings.LoadDeviceByName.html
  if (String.Compare(XRSettings.loadedDeviceName, desiredDevice, true) != 0) {
    XRSettings.LoadDeviceByName(desiredDevice);

    // Must wait one frame after calling `XRSettings.LoadDeviceByName()`.
    yield return null;
  }

  // Now it's ok to enable VR mode.
  XRSettings.enabled = true;
}

When this happens the app looks like this:

![alt text][3]


At the bottom of the scene I have implemented a button that when gazed at for 2 seconds, it will switch the app back to 2D mode. Here is the button:

![alt text][4]


I am currently gazing at the button. When the progress completes, the app switches back to 2D mode again, using google documentation code:

// Call via `StartCoroutine(SwitchTo2D())` from your code. Or, use
// `yield SwitchTo2D()` if calling from inside another coroutine.
IEnumerator SwitchTo2D() {
  // Empty string loads the "None" device.
  XRSettings.LoadDeviceByName("");

  // Must wait one frame after calling `XRSettings.LoadDeviceByName()`.
  yield return null;

  // Not needed, since loading the None (`""`) device takes care of this.
  // XRSettings.enabled = false;

  // Restore 2D camera settings.
  ResetCameras();
}

// Resets camera transform and settings on all enabled eye cameras.
void ResetCameras() {
  // Camera looping logic copied from GvrEditorEmulator.cs
  for (int i = 0; i < Camera.allCameras.Length; i++) {
    Camera cam = Camera.allCameras*;*

if (cam.enabled && cam.stereoTargetEye != StereoTargetEyeMask.None) {

// Reset local position.
// Only required if you change the camera’s local position while in 2D mode.
cam.transform.localPosition = Vector3.zero;

// Reset local rotation.
// Only required if you change the camera’s local rotation while in 2D mode.
cam.transform.localRotation = Quaternion.identity;

// No longer needed, see issue Odd distortion when VRSettings.enabled = false after leaving VR mode · Issue #628 · googlevr/gvr-unity-sdk · GitHub.
// cam.ResetAspect();

// No need to reset fieldOfView, since it’s reset automatically.
}
}
}
----------
Here comes the problem. When switching back from VR mode to 2D, EVERYTHING looks stretched. The Cardboard button, and even the skybox and the image loaded on it. My next and previous buttons are also gone. I am guessing they are there, but can`t be seen because the canvas that they are on is also stretched.
BEFORE:
![alt text][5]
----------
AFTER:
![alt text][6]
----------
Any idea why this happens and how it can be solved?
[1]: https://user-images.githubusercontent.com/31033336/41816421-4782a15c-779a-11e8-910a-582ebf45b6c7.png
[2]: https://user-images.githubusercontent.com/31033336/41816424-5b175f28-779a-11e8-8403-f9c62dc663d5.png
[3]: https://user-images.githubusercontent.com/31033336/41816487-a0d2047c-779b-11e8-9f2e-ad491bbfaec1.png
[4]: https://user-images.githubusercontent.com/31033336/41816488-aaf96de6-779b-11e8-8a09-021956565f60.png
[5]: https://user-images.githubusercontent.com/31033336/41816424-5b175f28-779a-11e8-8403-f9c62dc663d5.png
[6]: https://user-images.githubusercontent.com/31033336/41816494-dd80d2d6-779b-11e8-8869-06c00b83e5e3.png

hello @SJLV I have a pretty similar problem what happens is that I try to do what you create a button that allows me to switch between VR or noVR modes but I am very new and I do not know how to do it you could help me or just pass your project or a videotutorial to do the truth I have no idea how to achieve that: "(and I would really appreciate your help because for more than research I do not achieve anything I hope your answer greetings

Thanks to guys at GVR UNITY SDK developer team at Github, the answer was
Camera.main.ResetAspect();

simple as that!!!

Hi @SJLV I hace another problem that when I switch from VR mode to 2D mode, I cannot interact the objects in it, can you help me pleaseee. Thank you!,Hi @SJLV I have another problem that when t switch from vr mode to 2D mode, I cannot interact the object in 2D mode. Please help!!!. thank you