🏗️

Building for Devices

ℹ️
The process of creating an executable file for a device (e.g. Windows or Quest) is called Building. Without building, it’s only possible to run your apps within Unity, which isn’t really an option for the end users.

Building for Windows creates an .exe file, while building for Standalone VR headset creates an .apk file.

For a build to happen, one needs to specify a Build Target. This Build Target is a fancy name to say what kind of device you’re going to build for.

PaleBlue Trainer comes with handy presets, allowing you to configure your project for a Build Target more or less automatically.

Supported Target Devices

See 👓Supported VR Hardware for the list of devices we currently support for building.

Changing Build Target

Unity comes with its standard way of changing the build target, which is Unity Build Settings menu. However, in order to perform all the needed optimizations for a device, you’d need to use PaleBlue own PaleBlue Trainer Wizard.

In order to change Build Target Device:

  1. Open PaleBlue Trainer Wizard by going to Unity application menu, PaleBlue → PaleBlue Trainer Wizard.
  2. image
  3. In the Wizard window, open the Target Devices dropdown and choose the desired build target option
  4. image
  5. Click Change Build Target
  6. Click Apply Target Device Settings
  7. Project will re-compiled to the selected build target. Note that this can take quite some time.

Building

To create a build:

  1. In Unity menu, open File → Build Settings… menu
  2. image
  3. Click Build button
  4. This will open a dialog, you will see that the scenes are added to the build, and the relevant platform is chosen.
  5. image
  6. Click Build and select the folder where to place the build
  7. Build will run and produce an executable

When on Windows, the resulting build can be run straight away.

When on Android, the resulting .apk needs to be deployed to an Android VR headset (using SideQuest for example), and then it can be run.

ℹ️
Build targets chosen through the standard Unity Build Settings menu will be disregarded. Use the Wizard instead.

Build & Run

The most straightforward way to run and test your creations is of course in the Unity Editor itself, by clicking the ▶️ Play button. However, the behaviour on the actual target devices can be a bit different, and therefore it’s super important to test your applications on the target devices.

Building and deploying the executables is described above, but Unity also provides a very handy and easy way to deploy and run on an Android Standalone VR device straight from Unity.

Here’s how.

  1. Connect a supported Standalone VR headset to your PC with a supported USB cable
  2. Quest devices: make sure that the headset is in Development mode
  3. Typically a VR headset brings a popup in VR asking if the connection to the PC should be accepted - and you need to make sure it is
  4. Open Build Settings menu of Unity
  5. In Unity menu, open File → Build Settings… menu
  6. Make sure that you see your device in the Run Device dropdown
  7. image
  8. This dropdown should display all connected devices
  9. image
  10. If you don’t see the device in the list, click Refresh
  11. If you still don’t see the device, repeat the steps 1-3 from above
  12. When the device is in the list, click Build And Run
  13. The application will be automatically built, deployed to the device, and run on it at once
  14. Woo-hoo! You’re running your app on the Standalone VR device.

Troubleshooting:

If your application builds but fails during the copying to the device, uninstall any previous versions of the application from the device manually.