Unity 5.6 does not work with latest GVRSDK (android build problems) #524
Comments
Did you enable native VR and add Cardboard or Daydream to VR platforms in Player Settings? Because when you enable native VR you won't be able to set landscape left as you mentioned. Unity 5.6 doesn't support non-native integration as in prior versions of Google VR, it is not backwards compatible. You have to use native support, otherwise it won't work on Android. I only had manifest merge issues when I updated Google plugin or Unity, which was always resolved by deleting Google SDK and all of its files in the Plugins directory (including manifests) and reimporting it. Instead of reimporting the SDK, pulling the manifest files that used to work before the update from the repo, and replacing the updated manifests also worked. Also be sure not to have an AndroidManifest.xml file but only AndroidManifest-Cardboard.xml and AndroidManifest-Daydream.xml in Plugins/Android. |
No I didn't.. you are not supposed to use native SDK together with Google VR SDK asset |
I confirm that the problem occurs with iOS too, I have been getting crazy for over a week posting in every forum. The only solution was to remove the SDK and go native (with all the limitations implied). http://answers.unity3d.com/questions/1333075/project-runs-in-unity-but-fails-when-building-for.html |
@synthercat I agree it sounds a bit weird but you need to both install Google VR SDK and use native SDK starting with Unity 5.6. Native side takes care of the rendering but pointer and controller stuff is still handled by Google VR SDK. Perhaps there may be other things like that. For iOS we need to wait for 1.40 unless you want to dive into crazy hacks. Unity removed backwards compatibility and iOS side is lagging behind. |
I'm running into similar issues as @synthercat in trying to work with the simple "GVRDemo" from the latest gvr-unity-sdk, with Unity 5.6f3. I'm trying to look at an example scene in the SDK and build it to an android device for Cardboard use. Here is my process:
Problems:
Also, @guneyozsan : what do you mean by you have to "both install Google VR SDK and use native SDK starting with Unity 5.6"? I understand importing the GoogleVR SDK, but how do you "install native SDK"? what native SDK? thank you! |
@batchku Your app is working fine. You can simulate head with Alt+mouse or Ctrl+mouse and click around. The message in the game window is just a warning that you don't have a Daydream controller (a separate device with buttons that you hold in your hands). When you click "Virtual Reality Supported" you use native SDK embedded in Unity. Before 5.6 you had to disable "VR Supported" option and use imported Google SDK instead but with 5.6 you have to enable it but still use Google SDK. What we discuss is the expected behavior when you enable native SDK in Unity is you shouldn't need to import also the Google VR SDK. This seems to create some confusion for people who started development before native support in Unity. |
@guneyozsan thank you; that is helpful. I can confirm that I am indeed able to run the demo GVRDemo scene now. Here is a question: |
It can be better if you open a new issue for the reticle problem. |
Importing the GVR Unity SDK with the native integration is indeed the expected behaviour. For the reticle, we're using a new input system in 1.30 - please refer to GVR Demo for how we do this in Cardboard and Daydream. |
Dear miraleung. Your explanation above is not clear. Is there a BUG on version 5.6 for the iOS build procedure when using the GVR Unity SDK or NOT ? In a positive case, what should we do to fix it? |
There will not be a problem in the 1.40 release. There currently it's a bug in 1.30 but it had since been fixed in 1.40, which is coming out soon. |
I have not been able to get a working install on a google daydream phone with Unity 5.6f3 and the latest gvr sdk or the January one whatever version that was. I am using the Android SDK build tools v25. I just keep getting packaging errors referencing the manifest file. Resources not found. Like VrActivityTheme. So I went back to 5.6b11 and everything works fine. All versions work well in the editor. It just fails in the build to the phone. |
I still don't understand how to get this to work. Do I install the gvr sdk or is there another package along with that one to install? |
If you download the current Unity 5.6 release (5.6.0f3) from https://store.unity.com/download you'll get native Unity VR rendering on Android. You'll need to set the build platform in your project to Android and you'll need to enable VR support in Android player build settings, as well as as add 'Daydream' and/or 'Cardboard') under the VR SDKs (which appears beneath the VR support checkbox). Build your app (*.apk) and push it to your Android device and you'll have working stereo rendering. In order to use the Daydream controller, and to make use of any of the other Cardboard/Daydream prefabs and scripts you'll also want to install the GVR SDK (currently 1.40.0) In other words:
Footnote:
|
I got my app rendering for IOS and Android correctly for Cardboard simply using the 5.6Of3 version of Unity as stated above and turning on VR and my device choices in Player Settings. Now however, even when I make None my first choice and Cardboard my second for VR it 1 I see the stupid cardboard overlay in scene 1 where I just want a 360 view ( I turned off both on the main camera) and it renders scene 2 with both cameras what I want but defaults to Android....hmmm. This is driving me nuts. Anyone know the C# Syntax to 1. choose IOS as the device once more and 2. remove the GVR overlay off in a scene without importing the GVRSDK into Unity as it is a crasher. Added this C# code to my button and it does turn on the 2 cameras but all these other problems now... using System.Collections; public class CCardboard : MonoBehaviour
} |
Bump. I'm having the same problem as @nomadcandy. |
I downloaded and updated both Unity and the latest GVR SDK for Unity and I am able to get the scene in 360 then load another Scene in VR with Google Cardboard but when I go back to the 360 Scene and attempt to turn the Overlay off it crashes. It seems the memory leak is still there despite the update. using System.Collections; public class ShowGoggles : MonoBehaviour
I am wondering if an if statement is worth trying here... If anyone wants to offer up the syntax for turning the videos off before loading the other scenes or the if statement syntax awesome. I can test it and let everyone know. |
Follow this tutorial Video for setting VR unity SDK . Hope it will help |
Note this is a closed issue. The latest version of the Google VR SDK for Unity (currently 1.110.0) works with the Unity 5.6 and later. Please file a new issue if this is not working To switch between VR and 2D modes, see: |
@batchku Did you find solution to the reticle pointer ?? me too , it works like charm in the editor but not on real device ..... please help me!! |
the canvas was in front of the raycaster ... |
I just finished a 5-hour investigation on this matter
To make long story short : DO NOT USE UNITY 5.6. It does not go well with Google VR SDK
The long story :
In most cases... it seems to work fine (on the editor) but it does not build fine
Way to reproduce problem :
In general there are a bunch of problems related to 5.6
I tried all kinds of combo such as
Problems that I had to solve in various combinations of the conditions mentioned above :
Even solving all the above didn't provide with a proper build. I had variations like a build that would run as if were non-VR app, to crashes... etc
I can't believe that 5 days after the official release of 5.6 and all this info does not exist anywhere on the internet (until this post that is!)
I will wait your findings
The text was updated successfully, but these errors were encountered: