For development with Unity and Steam Frame we recommend targeting Android and Unity's built-in OpenXR plugin. We have a package you can install that assists with access to some additional built-in features, and includes the Steam Frame Controller OpenXR interaction profile. Development is pretty straight forward with the exception of needing to launch
Lepton Development and
adb connect before deploying to the headset.
First, make sure you have turned on
Developer Mode as described in
Setting up your Steam Frame for development. This will let you deploy to the headset.
Valve OpenXR Utilities Package
These features, with the exception of the interaction profile, are mostly simple interfaces to enable existing Unity functionality. For help with the features themselves please see the linked Unity documentation pages.
To install this package open the package manager, click the
+ then
Install package from git url and enter this url:
https://github.com/ValveSoftware/Unity.git?path=com.valvesoftware.openxr.utils - Steam Frame Controller OpenXR Interaction Profile - This feature lets you bind your Unity Actions to Steam Frame Controller buttons.
Requirements: OpenXR
- Valve Utils: Settings for Unity's Foveated Rendering - This provides access to the Unity feature for Foveated Rendering. It supports eye-tracking and allows a greater range of Unity and OpenXR versions than are supported by the official plugin. Unity documentation
Requirements: Unity 2022.3+, Unity OpenXR Plugin v1.9.1+, URP, Vulkan
- Valve Utils: Settings for Unity's Multiview Render Regions - This provides access to the Unity feature for Multiview Render Regions. This prevents rendering to regions that are not visible to the user through the headset. Unity documentation
Requirements: Unity 6.1+, Unity OpenXR Plugin 1.14.1+, Vulkan, Multiview
- Valve Utils: Lepton Validation - This feature checks through your Unity project and lets you know if there are things setup that will cause the build to fail to run locally on Lepton (Steam Frame's Android translation layer).
Requirements: Unity OpenXR Plugin v1.9.1+
- Valve Utils: Refresh Rate - This feature lets you query and request refresh rates on the headset via the XR_FB_display_refresh_rate OpenXR extension. Currently in SteamVR we only expose the currently in-use refresh rate.
Requirements: OpenXR
Project Settings
These settings are required for Android OpenXR builds to work on the Steam Frame.
- Enable OpenXR - Enable the OpenXR Plugin (Project settings > XR Management)
- Disable Meta XR - Disable all Meta XR and Meta Quest OpenXR Features (Project Settings > XR Management > OpenXR > OpenXR Feature Groups)
Note: New versions of the OpenXR Package have fixed having the Meta Quest Support feature enabled while deploying to non-meta headsets, but we recommend turning it off if your application doesn't load into VR correctly.
- Minimum API Level - Android 10 (API Level 29) or Android 11 (API level 30)
- Target API Level - Automatic (or after your minimum)
- Scripting Backend - IL2CPP
- Target Architecture - ARM64
- Graphics - Vulkan (recommended) or OpenGL
- Add Input Profile - Add Steam Frame Controller to your list of Enabled Interaction Profiles on the Android tab. (Project Settings > XR Management > OpenXR)
Steam Frame Controllers
By default the controllers will show up to your games as emulating Oculus Touch, you can bind to those controls and it will work. If you would like to bind to Frame Controller specific buttons or have Frame Controller specific offsets you can use the interaction profile provided in the package described above. We've tried to create aliases for the buttons that make sense. Please let us know if you have feedback on this.
Play-in-Editor
Deploying to the headset can be time consuming when trying to iterate quickly. If you setup your project to run OpenXR on Standalone (desktop) you can just hit Play in the editor and do most of your gameplay testing on PC through SteamVR, even while you're project currently targets Android. Remember to add the Steam Frame Controller to the list of Enabled Interaction Profiles on the Windows/Mac/Linux tab for the bindings to be the same as when on Android.
Building to Steam Frame
Building to Steam Frame is similar to building to other standalone headsets or mobile devices using adb. Refer to this article to get started:
Connecting adb to LeptonOnce connected to Lepton Development via adb, select
Build and Run under
Build Settings.
If you don't want to install the platform-tools from Google separately, adb.exe is included with the Unity Android module. Its installation path can be found under Preferences -> External Tools -> Android -> Android SDK Tools. Example file path: C:\Program Files\Unity\Hub\Editor\2022.3.13f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\adb.exe
Steamworks .NET
The main branch of
https://github.com/rlabrecque/Steamworks.NET includes Android support, but is not in a release yet. For now you can you can add the package to Unity via the git url:
https://github.com/rlabrecque/Steamworks.NET.git?path=/com.rlabrecque.steamworks.netEye Tracking
Our current support for eye tracking in Unity uses the Eye Gaze Interaction feature. There’s examples of using this in the
XR Interaction Toolkit samples. You can learn more about the feature here:
Eye Gaze Interaction | OpenXR Plugin | 1.0.3Notes