Immerse

Making a build

Step 12 of 13 |20 mins

General SDK programming guide

Testing and debugging an Immerse Scene

Description

The Immerse Platform allows Unity scenes to be easily distributed to VR and browser users, via a single URL. When joining a session, the Immerse Launcher will download the VR application (or open it from the cache). To enable the platform to do this, the application must be built and uploaded to the platform.

📘

Zip files and uploading

The build pipeline produces a Zip file for each of the platforms selected. These can be directly uploaded to the platform. See Immerse Scenes.

To simplify the build process, the Immerse SDK provides an automatic build pipeline from within the Unity Editor. This can be accessed by selecting Immerse > Build... from the Unity menu

This build pipeline will perform a few tasks to ensure the build will work correctly on the Immerse Platform:

  • Check for duplicate indexes across scenes (See Scene Object).
  • Check the scenes are valid (e.g. the App Object and Scene Object are included)
  • Disable development builds (if they are enabled)
  • Set specific 'Scripting define symbols' to allow conditional compilation, like excluding unit tests when we build.
  • Set the required WebGL settings, such as automatic resizing the memory heap
  • Setup minimum stack trace logging for release builds (debug build will allow full stack traces on both PC and WebGL builds)
  • Create metadata that will be uploaded with the Unity build output
  • Copy build settings and version information to the output folder for use by the Immerse Platform
  • Build any Assetbundles (if defined). Note: currently Assetbundles cannot be stored on the Immerse Platform, so these must be hosted elsewhere..
  • Build and zip the output for each of the platforms selected.

This pipeline can also be used in a Continuous Integration setup (like Team City or Jenkins).

To build, select required options and click the [Build] button.

🚧

Errors After Build

After building you may get an error "EndLayoutGroup: BeginLayoutGroup must be called first." in your unity console. This is a unity error relating to editor windows and can be safely ignored.

Options

OptionDescription
Use Combined ZipWhen building for more than one platform, all Zip output files will be combined into a single file.

This feature is not yet released, so individual Zip files will need to be created for now
Clean Output folderDelete all output from a previous build before starting a new one.
Debug BuildAllow debug builds.
WebGL Log Full Stack TraceWebGL Only. Log full stack traces with console output.
Note: Needs Debug Build enabled.
Note: Significantly reduces performance and increases build size.
WebGL Demangle Stack SupportWebGL Only. Log more readable stack traces.
Note: Needs Debug Build enabled.
Note: Significantly reduces performance and increases build size.
WebGL Full Exception SupportWebGL Only. Catch and output exceptions.
Note: Needs Debug Build enabled.
Note: Significantly reduces performance and increases build size.
Standalone Copy PDB filesSets this Unity setting before starting to build
Open build folder after buildLaunches Windows Explorer with the output folder open
Scenes excluded from VR buildAny scenes listed here will be ignored in the PC build. This is useful when a scene should only load as a PC build.
[comment]: # ( or Android VR builds. This is useful when you have a scene that should only load in PC or Android VR builds.)
Scenes excluded from WebGL buildAny scenes listed here will be ignored in the WebGL builds. This is useful when a scene should only load as a WebGL build.

Building for Oculus Quest

It is possible to build for the Oculus Quest by targeting the Android platform.

First you will need to set up your device for development. Instructions on how to do this can be found in the Oculus developers documentation Device Setup - Oculus Quest section.

🚧

Oculus Quest builds currently only supported in Offline Mode. Make sure to Enable Offline in Builds in the connection settings before building.

It is important to create an Android Manifest file for your project as some specific settings need to be set, in order for your app to be identified correctly by the device. One common symptom of an incorrectly configured Android Manifest file is that the Quest will only track one hand at a time (as it will identify itself as an Oculus Go).

Below is an example AndroidManifest.xml file. You must replace with your Package Name from Android Settings in Unity's Project Settings.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="<packagename>" xmlns:tools="http://schemas.android.com/tools">
    <application android:icon="@mipmap/app_icon" android:label="@string/app_name">
        <activity android:name="com.unity3d.player.UnityPlayerActivity"         
            android:screenOrientation="landscape" 
            android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
            android:configChanges="density|keyboard|keyboardHidden|navigation|orientation|screenLayout|screenSize|uiMode" 
            android:launchMode="singleTask" 
            android:resizeableActivity="false">
            <meta-data android:name="unityplayer.UnityActivity" android:value="vr_only"/>
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.INFO" />
            </intent-filter>
        </activity>
        <meta-data android:name="unity.splash-mode" android:value="0" />
        <meta-data android:name="unity.splash-enable" android:value="False" />
    </application>
    <uses-feature android:glEsVersion="0x00030001" />
    <uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="true"/>
</manifest>

After you have built your APK, it can be side loaded to your device in the same way as any other app.

References

General SDK programming guide

Testing and debugging an Immerse Scene

Updated 3 months ago


Making a build


Step 12 of 13 |20 mins

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.