In Unity 5.6, how to get inputs in Daydream mode without installing GVR SDK? - unity3d

I am working on Unity 5.6.5f1 with VR enabled and Daydream selected for an Android app. So my application is working with daydream but I would like to get inputs from the Daydream remote (only a simple click). Is that possible without including the GVR sdk to my project?
Alternatively, can I catch a click on the on/off button or the sound level button of the phone in my app?

You need to import the GVR unity package so that you can access the GVRController class. Only then can you get the on click event.

I finally managed to catch clicks on the volume up and down buttons of the daydream remote control thanks to this post. Quite an ugly solution but it does the trick and provides two inputs.

Related

Unity : How to test Oculus OVRinput through the editor? Workflow question

Here is my problem,
I'm using unity 2017.4.30 to develop an Oculus Go application. If anyone else has done this before you know that you can get Unity to build an APK and upload to the headset to test your software.
At the moment we are writing code to do with OVR Utilities, specifically OVRInput which basically is to do with the Oculus Go controller interacting with canvas or objects etc.
What I want to be able to do is test code we are writing in the editor and not have to upload the APK each time to test it. It seems some things like OVRCamera rig work in the editor fine but the controllers only show up when you run from the Oculus Go itself.
Any ideas how we could 'simulate' or 'virtualize' OVR controller in the editor so I can just click things with my mouse?
Thanks for reading,
If you do not want to write your own controller simulator, I'd suggest using the method oculus quest dev's have been using to quickly debug their game, which involves emulating a rift by using programs like ALVR or VirtualDesktop.
If set up correctly you'll be able to just press the play button in unity and instantly see your game on the oculus go.
The answer was the Oculus Link. When the Quest was connected to the PC via Link the Quest controllers where emulated inside unity. Problem solved.

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.

Access Cardboard VR Setting from Unity

While in Cardboard VR-Mode you can use a cogwheel icon in the top-right-corner.
This button access the VR Settings.
I want to access it directly inside of Unity3D.
I cant find any api making that available or mention it.
please help :)
Answer:
Assuming you mean either the settings button or the Cardboard back button, it seems you can customize the one via listening for KeyCode.Escape, but that the other one is fixed.
Source:
You can customize the behaviour of the Cardboard back button by listening for Input.GetKeyDown(KeyCode.Escape)), but the Settings button is not override-able.
https://forum.unity.com/threads/accessing-cardboard-back-and-configure-buttons.461975/

Custom Camera Permission config in Unity generated xcode project

I have a Unity project that is kicking out an Xcode project for ARKit. It's a single scene project and uses Vuforia as the camera since I am performing some image recognition for AR - my questions are:
Is there a way to show a custom permissions view prior to showing the actual Apple permission? Such as this: https://github.com/IvanVorobei/RequestPermission
If Don't allow is hit on the camera permissions alert from Apple, Vuforia seems to its own screen indicating to the user they'll need to navigate to the settings app in order to enable the camera for the app after "Don't Allow" was selected. Is there a way to ditch this screen in place of my own?
In a normal Xcode project this wouldn't be an issue but I can't seem to locate where this would be done at since I don't see anything related to the Vuforia camera in the project.
When you create a Vuforia ARCamera it has the DefaultInitializationErrorHandler script attached. If you want a custom design for the error handler, copy the DefaultInitializationErrorHandler script, rename it and use it instead.

How to load iPhone UIViewController from Unity3d?

I am developing one game application and i want to give login functionality to user. So i am planning to show Login view which is developed in xCode but how can i show it when my unity3d game is running. Means if user click on Login button from Unity3d it should show LoginView from xCode native.
can any body help me?
You'll have to use a plugin to interface between the Obj-C and Unity's C#. Here is the page that discusses plugins: http://docs.unity3d.com/Documentation/Manual/Plugins.html
At the bottom, there are some links to help you with setting up the code.
I believe that this is included in Unity iOS. Otherwise, it requires Unity Pro.