GoogleVR 1.0.1: stereo cameras are OK in the Unity Game View but too separated when compiled to Android - unity3d

I'd say the value I have to change is the stereoMultiplier of the StereoController script attached to the main camera. Anyway I think I have changed every single value of GvrViewer, MainCamera and StereoController. Nothing seems to change the separation of the left and right cameras when compiled to the Android smartphone.
I can see a correct separation in the Unity Game View, but when I compile it to the smartphone, the cameras are too separated (see image below).
I think this issue has happened after updating the Smartphone to Android 6.0 Marshmallow (CyanogenMod 13.0), on Samsung S4.
UPDATE: I have updated to GoogleVR 1.0.1. The same problem is still happening.

Changing scale to 0.007 (which is a very similar scale to the objects in the provided demo scene of GoogleVR: 0.003) seems to fix the problem.
Note: discussed here: https://github.com/googlevr/gvr-unity-sdk/issues/351
UPDATE: in the previous link, somebody wrote:
Android app:
/sdcard/Cardboard/current_device_params
all gvr(cardboard) app will use this file --- "current_device_params".
maybe you should go the url to setup your device profile https://vr.google.com/cardboard/viewerprofilegenerator/
in addiation, you can also do this:
How to change Field of View in Google VR SDK for Unity

Related

Unity : project works in editor but black screen when build

I'm on a project using Unity 2019 LTS and some unity SDK / package:
Mapbox SDK
DreamWorld SDK (the SDK of my AR headset)
some other default AR packages (Foundation, Subsystem)
I would like to reused the Mapbox World-scale AR example in order to implement the possibility to move the scene according my AR headset position.
To do so, I removed the default main camera of the example (in AR Root) and added instead a the camera for my headset, as explained in the headset's docs (DW Developer Kit SDK).
Here are some pictures of what I've done:
No here's my problem: when I run the project in the editor with the player mode, all works perfectly fine and I see the camera rotation following the position of my AR headset.
Therefore, if I try to build the project, I cannot the see the "view" of the camera. I know that the project run because I still can see the overlay menu provides by the Mapbox World-scale example but not my camera.
Editor :
Build :
I searched online to find some solution to my issue but I only found some answer about building to Android and iPhone while I trying to build on my laptop.
The fact I see a black screen (and the overlay) seems to me that Unity cannot find a camera to show me the scene.
I just started using Unity, so it is possible that I missed an obvious thing but I don't know what.
If someone as any idea of what my problem is...
In case the suggestion from the comments with the In-Game logs does not work, you can check the external log file.
According to https://docs.unity3d.com/Manual/LogFiles.html
it is found under "C:\Users\YOUR_USERNAME\AppData\LocalLow\CompanyName\ProductName\Player.log"
CompanyName and ProductName are two names you can project somewhere in the unity project settings but there are default values.

UI Elements Not Rendering Properly on Android

In my game, UI elements not rendering properly on an Android device.
But it working properly within Unity Editor.
Here is the example of this problem I am facing:
I have purchased old source code and then upgraded its source code to Unity 2018 version.
I have implemented a Canvas based UI system from scratch and completed all UI screens.
At last, I have run the game in actual Android device but I was shocked by getting above result.
I have checked all things as per my knowledge but all properties values are proper.
Here you have one object selected to show its inspector.
So please give me some suggestion to correct above problem.
Make sure the UI/Default shader is present. Project Settings > Graphics > Built-in Shader Settings

Google VR SDK stuck in portrait mode

I've built the app and compiled it with VR enabled and cardboard selected as my VR device. I can install and run it on my phone (Samsung S8) BUT the in game camera is stuck in portrait mode and the yew is inverted (turning my head left turns the camera right). I have scoured the internet but still can't find a way to fix this.
I've enabled VR in playersettings and added google cardboard as my VR.
I've also disabled portrait views under orientation.
I've set the camera as both a child and parent object.
I've built the app with both cardboard and daydream selected as the VR (and each individually) but still the same issue.
I've tried forcing different higher levels of API requirement
I have added and removed GvrEditorEmulator from the project and the GvrControllerMain and no luck.
I've even flipped the camera manually by a 180 degrees and this made the view be in landscape but in this case the pitch was inverted (when I look up the camera looks down) and I haven't found a way to resolve this.
In the editor view the screen looks fine, but every time I run it on my Android phone it force starts in portrait mode and the pitch or yew is inverted.
Is there a hidden option I need to switch, does anybody have more suggestions that I could try?
You can see what the app looks like when I hold the phone i portrait mode on the link bellow (the image breaks when I try to add it to the post for some reason).
https://imgur.com/a/o80NRe4
Its worth mentioning that I'm working with Unity version 2019 2.0b2 because any other version I tried would not detect my installed Android SDK and would not let me build the project. I've tried on multiple machines and always had that problem so I'm afraid of attempting an upgrade to a newer version would break my build ability.
This seems to be a known and reported issue for Google VR SDK for unity. Its been reported on their github page.
The only possible fix is reverting back to Unity 2018.3.14f1. I did this by exporting my v2019 project, then creating a new 2018.3.14f1 version project and importing the original into it. This rebuilds the project and should avoid conflicts if you're lucky.

Why is the sample Unity ARcore scene not detecting planes?

I installed the arcore-preview.apk on my Samsung 8(SM-G950U). Then I installed the sample ARCore scene from Unity onto the S8. The app starts up fine , but does not draw any point clouds or blue guidelines displaying the planes. I also cannot place the little Andy bot onto a plane. All I get is the UI saying, "Searching For Surfaces". Any ideas? I'll be continuously tinkering until I find a solution.
The problem seemed to have been the version of Unity(2017.2.0b10) I was using. So I just went back to the Unity Beta Archives and downloaded 2017.2.0b9 and then downloaded Android Target Support specifically for 2017.2.0b9. All is now working correctly!
You need to get the beta version 0b9, it won't work on the current stable one

When I install apk on android, one scene is black. How to fix it?

So, I made my game for Android device and I've got a menu, store, info scene and a main scene. The main scene is where I play the game. But when I hit start on the menu it loads the "MainScene" and all I can see is the GUI but nothing else. I can collect items but the scene is just black (except the GUI).
I tested out with a web player and everything was fine then changed to Android and after I installed it (several times) I looked at the black screen.
How to fix this?
(I'm using Unity 4.6.1)
Can't comment, not enough rep.
Anyway, there are lot of things that can cause a black screen to happen on Android. Here are a few to look at -
Be sure your camera is not getting deactivated (in your case maybe not).
Are you using any plugin that is using alpha channel or stencil buffer?
Any other plugin that may causing this, disable them to check.
Is your 24/32 bit buffer ticked/not on build settings?
Double check your camera settings, lighting.
Stripping level to disable and rendering path on build settings etc.
Check the game on another device.
Provide more info about the scene here
There's definitely something on that specific scene.