Making Builds

TButt’s workflow allows you to keep multiple platforms enabled in the Unity editor, so that your team members can work on your game with whatever headset they have connected to their machine. When you need to make builds, you’ll usually want to toggle off platforms and only keep the ones you need before you continue Unity’s normal build process.

Oculus Builds

In the Core Settings menu, disable all SDKs except for Oculus.

Extra Oculus Settings

If it’s your first time making a build, you’ll need to set your Oculus Dash settings in the XRSettings section of Player Settings for Oculus:

image-center

Note: These settings currently only apply to PC builds. Dash Support is required for store submission, the shared depth buffer is not.

Check PC Build Folders

After building your game for PC/Rift, check the “BuildName_Data/Plugins” folder. If you see Open VR or Steamworks DLLs in this folder, manually delete them before uploading to Oculus Store. Your game will still work fine without them as long as your calls are going through TButt.

Steam Builds

In the Core Settings menu, disable all SDKs except for Steam to force all headsets to route through Open VR.

Note: If you don’t have the Steam VR plugin in your project, you can optionally use Oculus Utilities to support Vive controllers (but it will still passthrough to Open VR). Enable Vive Support through the Oculus / Rift submenu in Core Settings to use this option instead of regular Steam support.

Native Oculus Support on Steam

If you want your Steam build to offer native Oculus support (instead of emulating that support through Open VR), you can leave both Oculus and Steam VR enabled in your Core Settings menu. Oculus will be first in the list of your Player Settings “Virtual Reality SDKs,” so if an Oculus device is detected, it will use Oculus SDK instead of Open VR. It’s up to you as to whether or not this is the right move for your game - native Oculus support will likely yield better performance, and it restores access to the menu button on the Touch controller. However, players cannot access the Steam VR overlay from within your game when using native Oculus support.

Daydream Builds

In the Core Settings menu, disable all SDKs except for Google.

Extra Daydream Settings

If it’s your first time making a build, you’ll need to set your foreground icon, background icon, depth format, and other options in the XRSettings section of Player Settings for Daydream:

image-center

Disabling OVRPlugin

If your project includes a newer version of the Oculus OVRPlugin than what came built-in to Unity, you may also need to manually disable that file from being included when building for Daydream. Search your project for “OVRPlugin” and uncheck the “Android” box on any OVRPlugin.aar files.

image-center

Careful: Failing to disable OVRPlugin can result in Samsung devices that support both Daydream and Gear VR to launch in Gear VR mode even with the Daydream version of your game. You’ll need to re-enable the plugin if you make a Gear VR / Go build later. We hope to automate this process with a build script in the future.

Windows Mixed Reality Builds

In the Core Settings menu, disable all SDKs except for Windows.

Extra Windows Settings

If it’s your first time making a build, you’ll need to set your depth format and buffer sharing setting in the XRSettings section of Player Settings for Windows Mixed Reality (on the WSA build target):

image-center

Scripting Backend for Windows

TButt is compatible with IL2CPP compilation for WSA apps in Unity. If you have XInput DLLs in your project, you may need to exclude it (TButt uses native Windows 10 input for gamepad support on WSA and XInput DLLs may be flagged when creating an appx for Windows Store).

Automated Build Tools

The Core Settings menu applies scripting define symbols and sets the Virtual Reality SDKs in PlayerSettings based on the platforms you’ve selected. If you’re using Jenkins or some other automated build tool, you’ll want to make sure you disable “Force Sync” in the Core Settings menu so that your scripts can drive the entire setup process without getting overridden.

Scripting Define Symbols

You can make your build scripts apply TButt’s scripting define symbols directly:

SDK Symbol Type Safe Reference
Oculus PC
Oculus Mobile
TB_OCULUS TBEditorDefines.oculusDef
Steam VR TB_STEAM_VR TBEditorDefines.steamVRDef
Daydream TB_GOOGLE TBEditorDefines.googleDef
Windows 10 TB_WINDOWS_MR TBEditorDefines.windowsDef

If using TButt’s platform service support, you can also use these scripting defines:

Platform / Service Symbol Type Safe Reference
Oculus TB_OCULUS_SERVICE TBEditorServiceDefines.oculusServiceDef
Steamworks TB_STEAM_SERVICE TBEditorServiceDefines.steamServiceDef