Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Meta scene capture api to the Godot OpenXR loader plugin #40

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Add the ability to customize supported Meta devices
- Add support for Quest 3 devices
- Update the directory structure for the v2 plugin
- Add export options for the Meta scene capture API

## 1.1.0
- Update Meta OpenXR loader to version 54
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,19 @@ const PASSTHROUGH_OPTION = {
"update_visibility": false,
}

const USE_ANCHOR_API_OPTION = {
"option": {
"name": "meta_xr_features/use_anchor_api",
"class_name": "",
"type": TYPE_BOOL,
"hint": PROPERTY_HINT_NONE,
"hint_string": "",
"usage": PROPERTY_USAGE_DEFAULT,
},
"default_value": false,
"update_visibility": false,
}

const SUPPORT_QUEST_1_OPTION = {
"option": {
"name": "meta_xr_features/quest_1_support",
Expand Down Expand Up @@ -130,6 +143,7 @@ func _get_export_options(platform) -> Array[Dictionary]:
HAND_TRACKING_OPTION,
HAND_TRACKING_FREQUENCY_OPTION,
PASSTHROUGH_OPTION,
USE_ANCHOR_API_OPTION,
SUPPORT_QUEST_1_OPTION,
SUPPORT_QUEST_2_OPTION,
SUPPORT_QUEST_3_OPTION,
Expand Down Expand Up @@ -195,6 +209,10 @@ func _get_export_option_warning(platform, option) -> String:
if not(openxr_enabled) and _get_int_option(option, PASSTHROUGH_NONE_VALUE) > PASSTHROUGH_NONE_VALUE:
warning = "\"Passthrough\" requires \"XR Mode\" to be \"OpenXR\".\n"

"meta_xr_features/use_anchor_api":
if not(openxr_enabled) and _get_bool_option(option):
warning = "\"Use anchor API\" is only valid when \"XR Mode\" is \"OpenXR\"."

_:
warning = super._get_export_option_warning(platform, option)

Expand Down Expand Up @@ -234,6 +252,11 @@ func _get_android_manifest_element_contents(platform, debug) -> String:
elif passthrough_mode == PASSTHROUGH_REQUIRED_VALUE:
contents += " <uses-feature tools:node=\"replace\" android:name=\"com.oculus.feature.PASSTHROUGH\" android:required=\"true\" />\n"

# Check for anchor api
var use_anchor_api = _get_bool_option("meta_xr_features/use_anchor_api")
if use_anchor_api:
contents += " <uses-permission android:name=\"com.oculus.permission.USE_ANCHOR_API\" />\n"

return contents


Expand Down
1 change: 1 addition & 0 deletions demo/export_presets.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -211,3 +211,4 @@ meta_xr_features/quest_1_support=false
meta_xr_features/quest_2_support=true
meta_xr_features/quest_3_support=true
meta_xr_features/quest_pro_support=true
meta_xr_features/use_anchor_api=false