Gvr-unity-sdk: Can't preview GVR 1.60.0 in Unity 2017.1.0f3

Created on 18 Aug 2017  路  13Comments  路  Source: googlevr/gvr-unity-sdk

Tried to start a new project, and import GoogleVRForUnity.unitypackage, still getting this error message:

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

It works on my Android device if I build and run.

duplicate

Most helpful comment

It looks like a better fix is you have to have an instance of the GvrControllerMain prefab in addition to the GvrEditorEmulator as the GvrControllerMain prefab has the GvrControllerInput class as a component which then will call UpdateEditorEmulation if running in Unity Editor mode. If this is how it should work the release notes probably want updating.

All 13 comments

i thinks is not a issue

This is working as intended. Only the Daydream VR SDK is supported in Editor.

Apparently Cardboard use to work but no longer.
Why has support been removed?

What version of the GVR SDK for Unity are you using? I believe this issue no longer exists in the latest SDK.

Hi Rus,
I had downloaded and installed the latest version of GVR SDK for Unity v1.110.0 yesterday
I am also running the latest version of Unity 2017.02.0f3 on Windows 10
However I鈥檓 starting to think this is actually a Unity issue.
The latest versions have added more built in support for VR/AR now labelled XR.
Regardless whether or not I install the GVR SDK package to the project when I try to select Android as the active platform with Google Cardboard VR I get an error in the console window VRDevice cardboard not supported in Editor Mode. Please run on target device.
And I鈥檓 unable to use the Alt/Control + mouse to control head tracking.
I鈥檝e standard on a VR course, which added an update video as the GVR SDK had changed since when the course was produced and introduced the emulator prefab I noticed they got the same error in the Unity console but it still worked. They were using Unity 5.6
I鈥檝e actually just downloaded Unity 5.6 to see if I can get a different result.
Publishing to an Android device (Nexus 6) does seem to work, it鈥檚 just working in the Unity editor that鈥檚 not working.

Thanks,
Lee

Hi Rus,
I've just been doing some testing using Unity 5.6 and the current 2017.02 and various older versions of the SDK.
The short is the current version of Unity works with
GoogleVRForUnity_1.70.0
GoogleVRForUnity_1.100.0
GoogleVRForUnity_1.100.1

However no longer works with GoogleVRForUnity_1.110.0
You get the Unity console warning in all versions, but Control/Alt + Mouse works in the Game view in the Unity editor where as build 1.110.0 no longer works.

Thanks,
Lee

Just another update
I have been comparing changes it appears that
Assets/GoogleVR/Scripts/GvrEditorEmulator.cs was refactored
Logic that was in void Update() has been moved into new method public void UpdateEditorEmulation()
However this doesn't seem to get called when running.
I changed mycode to recreate void Update() method which calls the new UpdateEditorEmulation() method and that fixes the problem.
I'm not sure whether or not this is the correct fix.

It might be worth either re-opening this issue or migrating to a new one.
Thanks,
Lee

It looks like a better fix is you have to have an instance of the GvrControllerMain prefab in addition to the GvrEditorEmulator as the GvrControllerMain prefab has the GvrControllerInput class as a component which then will call UpdateEditorEmulation if running in Unity Editor mode. If this is how it should work the release notes probably want updating.

i have used googleVR sdk 1.60.0 for my project on windows 10 with unity 2017.3.1f1
i have selected google cardboard in xr setting and switch my platform to unity only but cardboard view is not coming in my android in my mobile before this project they were coming in cardboard view

I'm not sure I understand the question. What are you seeing on your Android device when you run your app?

stereoscopic view is not coming on my mobile device

Could you post a screenshot of what your app is doing?

Was this page helpful?
0 / 5 - 0 ratings