Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In android Gear Vr, is it possible to launch an application normally, and then have it transition to Unity/VR when the user clicks the option? [duplicate]

In android GearVR, is it possible to launch an application in normal/phone mode, and then have it transition to Unity/VR when the user clicks a button to go into VR?

So far the app either launches completely in VR with "vr_only" as an option, or launches normally and goes to Oculus Home when we try "vr_both" or "vr_dual".

Is such a thing possible, or will we have to make two separate apps? Please note that using the "Virtual Reality Supported" option in Unity will not work on the Gear.

like image 758
Pat Avatar asked Aug 16 '16 14:08

Pat


1 Answers

I won't say that it is impossible but would be difficult to achieve as there is not simple way to do this. Using Virtual Reality Supported option in player settings as suggested by @Programmer is not an option. You can either check it or un-check it before building the app. Changing it later through code does not work for android build.

You can build a non-VR App and write native plugin to give users an option to start VR App which may be a different app (with a different bundle identifier). I am not good with native code so can't help you much with exact way to do this. Instead you can have a look at following links:

  1. http://answers.unity3d.com/questions/259935/open-app-from-other-app.html

  2. http://forum.unity3d.com/threads/android-ios-launch-from-within-a-unity-app-another-unity-app.222709/#post-1486300

  3. Is it practical to start a Unity game from an Android app and revert back from Unity to the app?

For more information on this topic follow this forum post on oculus forum: https://forums.oculus.com/developer/discussion/26935/gearvr-app-within-android-app

like image 140
Umair M Avatar answered Nov 01 '22 17:11

Umair M