After finishing up your custom Headjack template, you have two options for building your app for one of the supported platforms: locally in the Unity editor or using Headjack’s Cloud Build system. Here these options are explained further as well as what changes when building your app for app store distribution.

Local Building

Locally building your custom template is almost the same as building any Unity project for the target platform, like making sure the app name, icon and version are correctly set, including all required scenes in the “Scenes In Build” list and switching to the right build platform.

The only difference between building a regular Unity app is to configure the Headjack Settings window correctly.

Double check the App ID and AUTH Key and select the Virtual Reality API and VR Device of your target platform. Always click Apply Settings before building your app to make sure any platform-specific project settings are correctly set.

Now build your app with the Unity build menu and install/sideload your app as you would with any other app and enjoy your custom template in action.

One of the things you might notice in your newly built app is that an error pops up when attempting to stream video. On the iOS and Windows platforms, a proprietary video player library is missing from local builds that is required for video streaming. This proprietary library cannot be shipped with the Headjack SDK and as such is not included in local builds. Use the cloud building option described below to get a build of your custom app with this proprietary player included, especially for app store builds. Local app builds for Android platforms are fully featured and can even be locally built for app store distribution.

Cloud Building

In order to use Headjack Cloud Build with your custom template, it has to be uploaded to the Headjack CMS. Before generating your template package for uploading, make sure that all template assets are contained within the Assets/Template folder. Additionally, the cloud build process builds all available scenes into the final app, so remove any scenes that are not used to make your final app as small as possible.

After that preparation you can export your template simply by using the menu option Headjack > Export Project as Template.

The generated .zip package can then be uploaded to the Headjack CMS by adding a new template or updating an existing one.

Don’t forget to define any custom variables used by your template.

You can now cloud build an app with your newly uploaded template by selecting the custom template on the app edit page and starting the cloud build process for your desired platform(s).

Check the cloud build progress on the app builds page and in case of build errors you can find a condensed build log there by clicking the “info” button on the right.

Store Building

For iOS and Windows platforms, we highly recommend using Headjack Cloud Build to build your app for those app stores. As previously mentioned, cloud built apps include a proprietary video playback library for streaming video that local builds do not have.

There are in fact advantages to using Headjack Cloud Build to build your app for all app stores, including Android platforms. The cloud build process guides you through creating and managing app store credentials and cloud building makes sure the Unity project settings are set correctly for app store compliance. Additionally, cloud builds continue to be hosted on the Headjack CMS for at least a year, making it easier to manage different versions of the app. Learn more about app store requirements and how to submit your custom app in the dedicated app store section of the knowledge base.

For Android platforms, you can choose to build your store apps locally in order to reduce build times and manage everything yourself. The basic setup is much the same as described above in “Local Building”, the only difference being to enable the Store Build tick box in the Headjack Settings. Different (VR) platforms and their app stores also require their own setup in Unity. For those requirements please refer to the platform’s own documentation, like this Oculus documentation for instance.