How can I see the game on my glasses when pressing play in the editor - unity3d

How can I see the game on my glasses when pressing play in the editor?
I'm using GearVR. USB Cable is plugged to my headset.

You have to build and deploy the app on your phone and when it runs then mount it in headset. You can not use unity remote for VR apps. This is because GearVR headset takes priority when you mount the phone. VR apps which have GearVR sdk enabled should default "insert your phone in headset" when you run it. An app can either be VR or Non-VR and UnityRemote is Non-VR App. Can only be used as container for Non-VR games.

Related

Why is my unity app crashing when I start another one?

I'm trying to create a multiplayer scene with VR in Unity using a HTC Vive and steamVR. But I can't test my app on a single computer. I do a "build and run" then my app start but when I click on play in the unity interface, the built app crashes. I don't why. I observed that this phenomenon exists when I add the [CameraRig] prefab from the Steam VR plugin which is essential for the VR
Could you help me please ?
Thank you

Unity Steam VR launches incorrect

I've programmed a virtual reality game for the HTC Vive in Unity. I used Steam VR.
If I play the game on Unity, everything runs perfectly. It runs also perfectly if I build it. But if I copy my build to another computer, nothing's working.
It looks like this:top right corner
Does anyone no how to solve this?.
My Vive is setup correctly and other games are working just fine.
Thank you
Roman
Make sure before each build that OpenVR is set as first target in the player settings and not "None" (sometimes Unity changes it).
On the other computers, they should obviously have Steam and SteamVR installed
Since Steam workflow is to launch games from Steam Library,which launch SteamVR automaticly. make sure the SteamVR app is launched before launching your .exe.

How do I test the Air Tap gesture in Hololens Emulator?

I am building an Augmented Reality app for Hololens. I need to test the Air Tap Gesture, without deploying to the Hololens.
Is there any method to test the Air Tap functionality through the Hololens Emulator or the Holographic Emulation provided by Unity3D?
This will depend on your emulation environment:
Hololens Emulator (From Microsoft, allows multiple input devices)
Air tap gesture - Right-click the mouse, press the Enter key on your keyboard, or use the A button on an Xbox controller.
Windows Holographic Emulation (From Unity, requires game controller)
Perform a tap gesture with a
virtual hand - Left and right trigger buttons; the A button
Adding to the other answer. If you don't have a HoloLens this will not help but, if you do this will speed up development significantly.
On your HoloLens, download the Holographic Remoting App. Once it is downloaded open and run it and you will see your IP address for your HoloLens.
Now, go to the Unity editor -> Window tab -> Holographic Emulation. This will open a new window. For Emulation mode select remote device. Under Remote Machine enter the IP address. You can tinker with the other settings as you see fit.
Now with the Application running on your HoloLens click connect. Once you are connected the Unity editor will tell you and the HoloLens should go blank. Now when you press play on the editor the app will run on the HoloLens.
This does not download the app to your HoloLens and stops running when you stop the editor
If you are working in the Unity editor,
Shift + LMB (left-mouse-button) to simulate air-tap with the left
hand;
Space + LMB to simulate air-tap with the right hand.
Other useful points:
gaze can be controlled with the mouse by keeping RMB down. Also
q/w/e/a/s/d. (I know question was only about airtap, but they kind of
come together).
If you need to test typing some data with the standard keyboard, no
need to simulate airtap - just click with the mouse.

how to use the cardboard sdk for pc vr game?

so I want to create a vr game using unity3d and cardboard sdk for PC(windows), which I'll stream to my phone screen using kinoConsol. I created a simple scene when I build it for android,it works fine , I mean it shows the dual sbs camera(screen), but a windows build shows only one normal camera(screen).. is there a way I can use the cardboard sdk to show the sbs camera(screen) in a windows build ?? if not is there any thing else available to achieve this ?
Side by side is easy, just place two cameras where the eyes should be and change their viewport rect to half width. Now you have a side by side stereo renderer without any external library. Cardboard also adds some distortion to the lenses, but it is not that important to use it in your case.
Your second, and much bigger problem is the gyroscope - you have to somehow communicate the position of your headset to your unity app on your pc. This is not trivial and probably will require finding or building an persistent service on your android device that will send the orientation data to your desktop app.

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.