Deploying Your VR Project
Проверено с версией:: 5.3
In this article we will discuss deploying to two of the platforms supported by the VR Samples project - DK2 and Gear VR. There are of course a variety of other deployment platforms for VR in various stages of development, and we hope to expand the scope of these articles to support those which release consumer products in the future.
Deploying to the Oculus DK2
While you can easily test your project on the DK2 just by pressing play in Unity, you’ll need to deploy your project for testing outside of Unity occasionally, and for distribution.
Deploying your project for DK2 is quite straightforward. Ensure that the DK2 is working correctly, and that your current selected platform is Standalone (see The Basics section in our Getting Started in VR with Unity article).
Ensure that your scene(s) are included under the Scenes In Build, click Build and Run and Unity will export a standard Windows build with a .exe file and supporting content folders.
Run the .exe file as usual, and if a project is is built with VR support enabled, it will attempt to start in VR mode on the DK2 automatically. If you have issues with running the .exe, you may wish to optionally force VR mode, by using the command line argument -vrmode, which is covered in the VR Overview section of the Unity manual.
You might also wish to use a batch file, as shown below:
BuildName.exe -vrmode oculus
Oculus have additional information on building for DK2.
Deploying to the Gear VR
To set up your environment for Gear VR development, you’ll need to set up both Unity and your phone for Android development first. Keep in mind that the consumer GearVR supports the Samsung Galaxy S6, S6 Edge, S6 Edge+, and Note 5 handsets only at present:
Enable developer settings on your phone by following this guide, then enable USB debugging on the developer menu.
Finally, follow the detailed instructions on the Oculus website on building for Gear VR.
Do take note of the requirement for a Assets/Plugins/Android/assets/ directory, and the accompanying OSIG files, which are required to deploy content on your Gear VR. To help remind you, we have placed a Readme.txt in that directory of the VR Samples project.
Remember that if you are not distributing your Gear VR content via the Oculus Store - perhaps sending builds to be reviewed on colleagues devices - you will still need an OSIG file in that directory for every device your content needs to run on.
Publishing on the Oculus store
To publish your project to the Oculus store(s), please see the publishing documentation on the Oculus site.
Publishing on Oculus Share
Oculus Share allows you to share your DK2 VR games and experiences with the community, and receive feedback from users all over the world. It’s a great way to distribute your work and gain valuable insights from players.
To publish your content on Oculus Share, please read their submission guidelines.
Remember that to discuss any issues with VR, including deployment, head on over to the Unity VR forum.
You should now know how to deploy your project to DK2 and Gear VR. Our next article, Optimisation, will cover the basics of getting your content running well in VR.