Does the Samsung gear vr trigger work on a command Input.GetMouseButtonDown(0) - unity3d

I made cardboard aplication and i use Input.GetMouseButtonDown(0) on google cadboard it works. But i dont have gear vr device to try on it. I am search on a google and i find that they have bluetooth controller and trigger button on it.

Yes. GearVR has a external controller and a touchpad to trigger input.
And yes Input.GetMouseButton(0) works in GearVR too provided you have to make some changes.

Related

How to use Joystick Emulator in Unity

I'm developing the WebGL game need to be controlled by a joystick.
But I don't have a joystick device.
I don't have any idea which joystick emulator is the best for unity and how to use it.
You could maybe connect a playstation/xbox controller via a usb cable to your computer. Then you could it to see if your controller works on your computer by using this website: https://gamepad-tester.com
then look at this to see if it works, the different parts of the controller in the image should react to what you do with the controller in real life:

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/

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

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.

How to trigger capture button of native camera programatically in android

I am trying to develop a remote trigger for native camera app. I am searching for this in Google but didn't find any way. I don't want to open camera intent but trigger the capture button of native camera app like wireless selfie stick.

Detecting when device in cardboard headset in Unity

I'm building a Unity Cardboard app, and would like to detect when the device is in the headset. The NFC in theory has this data, but it does not seem to be exposed in the API. I would like to have the app automatically enter VR mode when in the headset, without the user needing to toggle in and out of a VR mode.
Basically, I want Cardboard.vrModeEnabled to be automatically updated when you enter or exit a headset.
Is this possible? Thanks!
It used to be in the (non-Unity) SDK but was deprecated, for several reasons. For one, the NFC sensors on phones are placed in different places, so the detection was not uniformly reliable. For another, using the sensor this way drains battery quickly.
There are a lot of cardboard models on the market. a lot of them don't come with an NFC tag. so i wouldn't count on it.
Best approach for me is to start in VR mode, when the user touches the screen, disable VR mode for 10 seconds since the last touch and then go back to VR mode.