Running google-vr unity daydream app on google pixel - unity3d

Im trying to run the sample app provided in the daydream page on the google pixel phone.
1) I chnaged the build settings to android.
2) Went to player settings enabled Virtual reality support and selected google daydream as the platform.
3) I changed the Minumum API to API level 24.
4) I added the folder containing my adb to the path variable in windows.
5) I also set the path of the android SDk.
6) I enabled USB debuggin on Pixel
However when I run my app , I get the following errors:
Device daydream not supported in Editor Mode. Please run on target device.
And..
Failed to read from controller emulator app event socket.
Verify that the controller emulator app is running.

build the apk and start it on your device. build and play requires adb.

As I suppouse, you want to DEBUG your Daydream app on your Programming Environment (Unity in this case).
Note:This solution allows you to debug on your PC but you'll need one Pixel Phone connected to your PC, and one Daydream Controller.
First of all I recommend you to download the samples provided by Google on Github if you have not done it yet:
https://github.com/googlevr/gvr-unity-sdk/releases
When you load any scene you'll see that the Daydream basic set is composed for a hierarchy like:
The two selected components are key for your porpouse cause if you want to debug Daydream from your PC you'll need to "link" your daydream controller with InstantPreview App. Instant preview will downloaded instantly on your phone if you got in your scene the "GvrInstantPreviewMain".
InstanPreview Google Info: https://developers.google.com/vr/develop/unity/instant-preview
When the app has been opened, can happen 3 things on your pixel phone:
Everything works as it should.
Daydream Instant Preview infom to correct the device by USB.
Kind of Grey screen with some text.
If you're on 2.
This seems to happen when your Unity Project is desynchronized from your phone and you'll see something like:
Close InstantPreviewApplication on your phone, close your unity project (remember to save your progress), and open again your unity project. That has almost always solved me.
If you're on 3.
This seems to happens when instan preview is waiting for Unity Play Mode.
You only need to press Play on you Unity Poject.
Remember to press (and mantain) synchronize button on your Daydream controller if you can move the headset camera but can't find your controller reticle.
This works for me.
I also append my own Unity project with this scheme that works bought for Daydream and GearVR in case helps someone else to test my solution:
https://github.com/ls29322/VR_GalleryApp

Related

Why do I alert protect after android build in unity?

Hello I made a game in android unity 2017.4.20 or unity 2019.1.9 then Installed it on my phone but I have an Alert:
Screenshot
How I can fix it?
This happens since your application is not on the play store yet
(And you "installed' this application from somewhere else other than the play store)
This will not be an issue when you upload your application to the google play store, since other users will be downloading from the store only.
For now, since you are testing the game, just ignore the error and click "install anyways" to test the application on your device.

Android Device can't able to connect with Profiler Window

I want to get performance analytics of my game using Profiler so I have exported build with Autoconnect Profile setting enabled.
After this process build installed within an Android device but it can't able to run the game, it just displaying black screen nothing else. Profiler can't able to connect with the connected Android device, I was getting this kind of list within Unity profiler:
Now android device showing just black screen and profiler not moving ahead, it just remains connected with Editor only.
I have tried to connect and disconnect my Android device multiple time but nothing changed in this. Please give me some suggestion into this so I can start my debugging process.
I have already gone through this post:
Profiler window
I believe you need to build in DevelopmentBuild enabled to be able to attatch profiler

Unity ads displaying an ad example and not the real ads

http://prntscr.com/cv3hc3 and http://prntscr.com/cv3hh0 seems to be perfectly set up, while my ads still display the "unity ads" example. How can I display real ads and get money from it?
Turning test mode in the UnityAds dashboard on and back off again did it!
Have you set test mode to false? this is from the Unity blog:
If we are running our project in the
editor we will see a generic billboard ad. If we are running this on
device and test mode is set to true (see above) then we will see a
placeholder ad. Finally, if we are on device and test mode is false we
will see a real live ad.
source: https://blogs.unity3d.com/2015/04/09/integrating-unity-ads/
I am not sure if your build target is properly set up, but this is a point worth mentioning as well:
NOTE: Since ads are currently only supported for iOS and Android, your
editor will have to be targeting one of those platforms in order to
see any test ads. Before going further you may want to switch your
platform to either iOS or Android in the Unity build settings
(File->Build Settings)
source https://blogs.unity3d.com/2015/04/09/integrating-unity-ads/
just uncheck the TestMode in services then try to build the app and install it in real devices then it works great.

Error message only when running the app on real smart TV

I am trying to develop a samsung smart tv app, which so far works quite well on Samsung SDK's emulator (I am using version 3.5.2), however when I sync my app on a smart tv, the result is not the same as running at emulator.
For example, at scene A, when I press button left, I suppose to navigate to scene B, which works as expected in emulator.
However at the real smart tv, when I press button left, nothing happens, and the log has a strange error message: cannot run current focused scene's key handler.
I have searched the official Samsung development forum but seems not many people face this problem, anyone can help and tell me why I get this error and how can I solve it ?? Thanks!
you need to pass the focus to the new scene that you want to be active.
For example scene2.focus()
Also you should update the SDK, 3.5 is quite old! Try using Samsung SDK 4.5

Captivate's ID coming up as "?????????" in manual emulator selector in Android Eclipse Manager

Solution: Why is Eclipse's Android Device Chooser not showing my Android device?
THis is getting annoying. My device shows up in eclipse on all
platforms.. Except when I am on my Ubuntu laptop.. when I "run
configurations" with it set to Manual.. I can see that there is an
Emmulator running that I can Install the App to.
Problem is, the Emulator is a pile of horse crap when it comes to
testing on real devices like my Samsung Captivate.
When the Captivate is plugged in via USB.. it shows via ICON, except
the ID is set to ??????????? and nothing else seems to be registering.
I can highlight it, but I can't launch it.
The captivate I am using is Rooted and running the LagFix Kernal..
However this has never hindered me on Windows or OSX.
Help.. I am trying to go completely Linux.. if it kills me.
See screenshot below: http://img265.imageshack.us/i/sdkbugeclipse.png/
UPDATE: Device is showing in the manager even when not connected?!?!
This has to be some weird Eclipse bug.. PLEASE HELP!
Solution (in case you missed my edit) need to add the correct Samsung Device ID when using the SDK with Ubuntu: link