Oculus Mobile Godot plugin
This is a work in progress which requires a few unsubmitted changes (PR #29824) in the core of Godot, and has a few remaining issues.
Check back here soon when we're a little further along!
This repository contains the source code for the Oculus Mobile Godot plugin. See demo project as an example for how to use the plugin.
This is an Android only plugin that is only supported on the following Oculus Mobile devices:
- Oculus Quest
- Oculus Go
The use of this plugin require Godot 3.2 or later.
- This project is released under a MIT license.
- Please check the Oculus Mobile SDK license for information about the Oculus Mobile SDK used in this project.
After cloning this repository make sure to initialise the submodules with
git submodule init.
When you've pulled a newer version make sure to run
git submodule update.
The project uses
cmake as its primary build system, which you can configure by following the setup instructions
for the Android SDK & NDK.
Android SDK & NDK
- Download and setup the latest version of the Android SDK.
- Add the Android SDK cmake binaries directory to the environment path. The directory can be found under
- Download and setup the latest version of the Android NDK.
- Set the environment variable
ANDROID_NDK_HOMEto the Android NDK location.
By default the project is configured to checkout the godot_headers
repo as a submodule under the
You can edit the
GODOT_HEADERS_DIR cmake variable in the
CMakeLists.txt build file if you'd like to provide a
different source for the Godot headers.
Note: At the moment, the godot_headers repo does not have the necessary dependencies to build this plugin. As such you'll need to update your Godot fork to patch in the missing dependencies:
- Clone the Godot repo, and patch in PR #29824
- Open the
platform/android/java/AndroidManifest.xmland add the following meta-data entry above the
<meta-data android:name="com.samsung.android.vr.application.mode" android:value="vr_only"/>
- Rebuild the Godot Android shared libraries
- Optional: build the export templates for your Godot fork by following these instructions
- Update the
GODOT_HEADERS_DIRcmake variable in the
CMakeLists.txtbuild file to point to the location of the updated headers (e.g:
Oculus Mobile SDK
- Download the latest version of the Oculus Mobile
SDK into a sub-directory of the
ovr_sdk_mobiledirectory. It's recommended to use the SDK version as the sub-directory name (e.g:
ovr_sdk_mobile/1.23.0/for version 1.23.0 of the Oculus Mobile SDK).
- Update the
OVR_ROOT_DIRcmake variable in the the
CMakeLists.txtbuild file to point to the Oculus Mobile SDK root directory.
Note: Ensure you're using the Android SDK's version of
In the project root directory:
- Navigate to the
cmake -GNinja .. cmake --build .
Once the build successfully completes, the plugin and its dependencies shared libraries can be found in the
default output location:
When exporting the project apk, make sure that
Xr Mode under the Android export
Graphics section is set to
Oculus Mobile VR.