Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unity: VRDevice cardboard not supported in Editor Mode. Please run on target device

There is a problem that the screen can not be divided during the card board test. I'm use versions for goolge sdk for unity 1.6 and Unity 5.6.2f1. in emulater(unity game scene),Game Scene does not split when playing. and console display "VRDevice cardboard not supported in Editor Mode. Please run on target device." but, Screen is split when testing on phone. What's the problem?

like image 780
minsae Lee Avatar asked Jun 27 '17 07:06

minsae Lee


2 Answers

Google VR SDK for Unity v1.50 (May 2017) or above have removed support for stereo preview in the unity editor. See release notes:

GvrViewerMain will be replaced by GvrEditorEmulator. The editor preview is now mono, not stereo, but will still support simulated headtracking.

like image 185
bruceoutdoors Avatar answered Oct 31 '22 21:10

bruceoutdoors


The "VRDevice cardboard not supported in Editor Mode. Please run on target device" console warning message simply indicates that the Unity editor currently doesn't provide the ability to emulate the "cardboard" VRDevice provided by the Cardboard VR SDK in the editor.

For the most part, it's safe to ignore this warning. What it means is that even though you configured Cardboard as the first VR SDK (Player Settings > Android > XR Settings > Virtual Reality SDKs > Cardboard), Unity is effectively using None as the configured VR SDK.

Because of this, be aware that in the editor:

  • XRSettings.loadedDeviceName will be "" (meaning the None VR device)
  • XRSettings.enabled will be false
  • XRSettings.LoadDeviceByName("cardboard") will fail

Depending on the version of Unity you are using, XRSettings mentioned above may still be called VRSettings.

In those versions Player Settings > Android > XR Settings > Virtual Reality SDKs can be found instead under: Player Settings > Android > Other Settings > Virtual Reality SDKs

If you're creating an app that you want to start in 2D instead of VR:

  1. Change Player Settings > Android > XR Settings > Virtual Reality SDKs to list the None device first, then add Cardboard as the second device. Because Unity tries VR SDKs in the order specified, this tells Unity to start your app in 2D.
  2. Follow https://github.com/googlevr/gvr-unity-sdk/wiki/Switching-between-VR-and-non-VR-at-runtime to switch to VR mode at runtime.
like image 45
Fred Sauer Avatar answered Oct 31 '22 22:10

Fred Sauer