Merge pull request #117 from Nitwel/fixes

Update Godot and openxrvendors
This commit is contained in:
Nitwel 2024-03-21 10:50:32 +01:00 committed by GitHub
commit d4776737dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
50 changed files with 116 additions and 591 deletions

View File

@ -1,5 +1,12 @@
# Change history for the Godot OpenXR loaders asset
## 2.0.3
- Migrate the export scripts from gdscript to C++ via gdextension
- Manually request eye tracking permission if it's included in the app manifest
- Change how singletons are accessed
- Fix the plugin version for the export plugins
- Add OpenXR extension wrappers for fb_scene, fb_spatial_entity, fb_spatial_entity_query, fb_spatial_entity_container
## 2.0.0
- Update to the new Godot 4.2 Android plugin packaging format
- Update the plugin to Godot v2 Android plugin

View File

@ -1,19 +0,0 @@
@tool
# Set of supported vendors
const META_VENDOR_NAME = "meta"
const PICO_VENDOR_NAME = "pico"
const LYNX_VENDOR_NAME = "lynx"
const KHRONOS_VENDOR_NAME = "khronos"
const VENDORS_LIST = [
META_VENDOR_NAME,
PICO_VENDOR_NAME,
LYNX_VENDOR_NAME,
KHRONOS_VENDOR_NAME,
]
# Set of custom feature tags supported by the plugin
const EYE_GAZE_INTERACTION_FEATURE = "XR_EXT_eye_gaze_interaction"
const OPENXR_MODE_VALUE = 1

View File

@ -1,186 +0,0 @@
@tool
extends EditorPlugin
var globals = preload("globals.gd")
# A class member to hold the export plugin during its lifecycle.
var meta_export_plugin : GodotOpenXREditorExportPlugin
var pico_export_plugin : GodotOpenXREditorExportPlugin
var lynx_export_plugin : GodotOpenXREditorExportPlugin
var khronos_export_plugin : GodotOpenXREditorExportPlugin
func _enter_tree():
var plugin_version = get_plugin_version()
# Initializing the export plugins
meta_export_plugin = preload("meta/godot_openxr_meta_editor_export_plugin.gd").new()
meta_export_plugin._setup(globals.META_VENDOR_NAME, plugin_version)
pico_export_plugin = preload("pico/godot_openxr_pico_editor_export_plugin.gd").new()
pico_export_plugin._setup(globals.PICO_VENDOR_NAME, plugin_version)
lynx_export_plugin = preload("lynx/godot_openxr_lynx_editor_export_plugin.gd").new()
lynx_export_plugin._setup(globals.LYNX_VENDOR_NAME, plugin_version)
khronos_export_plugin = preload("khronos/godot_openxr_khronos_editor_export_plugin.gd").new()
khronos_export_plugin._setup(globals.KHRONOS_VENDOR_NAME, plugin_version)
add_export_plugin(meta_export_plugin)
add_export_plugin(pico_export_plugin)
add_export_plugin(lynx_export_plugin)
add_export_plugin(khronos_export_plugin)
func _exit_tree():
# Cleaning up the export plugins
remove_export_plugin(meta_export_plugin)
remove_export_plugin(pico_export_plugin)
remove_export_plugin(lynx_export_plugin)
remove_export_plugin(khronos_export_plugin)
meta_export_plugin = null
pico_export_plugin = null
lynx_export_plugin = null
khronos_export_plugin = null
class GodotOpenXREditorExportPlugin extends EditorExportPlugin:
## Base class for the vendor editor export plugin
var globals = preload("globals.gd")
var _vendor: String
var _plugin_version: String
func _setup(vendor: String, version: String):
_vendor = vendor
_plugin_version = version
func _get_name() -> String:
return "GodotOpenXR" + _vendor.capitalize()
# Path to the Android library aar file
# If this is not available, we fall back to the maven central dependency
func _get_android_aar_file_path(debug: bool) -> String:
var debug_label = "debug" if debug else "release"
return "res://addons/godotopenxrvendors/" + _vendor + "/.bin/" + debug_label + "/godotopenxr" + _vendor + "-" + debug_label + ".aar"
# Maven central dependency used as fall back when the Android library aar file is not available
func _get_android_maven_central_dependency() -> String:
return "org.godotengine:godot-openxr-vendors-" + _vendor + ":" + _plugin_version
func _get_vendor_toggle_option_name(vendor_name: String = _vendor) -> String:
return "xr_features/enable_" + vendor_name + "_plugin"
func _get_vendor_toggle_option(vendor_name: String = _vendor) -> Dictionary:
var toggle_option = {
"option": {
"name": _get_vendor_toggle_option_name(vendor_name),
"class_name": "",
"type": TYPE_BOOL,
"hint": PROPERTY_HINT_NONE,
"hint_string": "",
"usage": PROPERTY_USAGE_DEFAULT,
},
"default_value": false,
"update_visibility": false,
}
return toggle_option
func _is_openxr_enabled() -> bool:
return _get_int_option("xr_features/xr_mode", 0) == globals.OPENXR_MODE_VALUE
func _get_export_options(platform) -> Array[Dictionary]:
if not _supports_platform(platform):
return []
return [
_get_vendor_toggle_option(),
]
func _get_export_option_warning(platform, option) -> String:
if not _supports_platform(platform):
return ""
if option != _get_vendor_toggle_option_name():
return ""
if not(_is_openxr_enabled()) and _get_bool_option(option):
return "\"Enable " + _vendor.capitalize() + " Plugin\" requires \"XR Mode\" to be \"OpenXR\".\n"
if _is_vendor_plugin_enabled():
for vendor_name in globals.VENDORS_LIST:
if (vendor_name != _vendor) and _is_vendor_plugin_enabled(vendor_name):
return "\"Disable " + _vendor.capitalize() + " Plugin before enabling another. Multiple plugins are not supported!\""
return ""
func _supports_platform(platform) -> bool:
if platform is EditorExportPlatformAndroid:
return true
return false
func _get_bool_option(option: String) -> bool:
var option_enabled = get_option(option)
if option_enabled is bool:
return option_enabled
return false
func _get_int_option(option: String, default_value: int) -> int:
var option_value = get_option(option)
if option_value is int:
return option_value
return default_value
func _is_vendor_plugin_enabled(vendor_name: String = _vendor) -> bool:
return _get_bool_option(_get_vendor_toggle_option_name(vendor_name))
func _is_android_aar_file_available(debug: bool) -> bool:
return FileAccess.file_exists(_get_android_aar_file_path(debug))
func _get_android_dependencies(platform, debug) -> PackedStringArray:
if not _supports_platform(platform):
return PackedStringArray()
if _is_vendor_plugin_enabled() and not _is_android_aar_file_available(debug):
return PackedStringArray([_get_android_maven_central_dependency()])
return PackedStringArray()
func _get_android_libraries(platform, debug) -> PackedStringArray:
if not _supports_platform(platform):
return PackedStringArray()
if _is_vendor_plugin_enabled() and _is_android_aar_file_available(debug):
return PackedStringArray([_get_android_aar_file_path(debug)])
return PackedStringArray()
func _get_android_dependencies_maven_repos(platform, debug) -> PackedStringArray:
var maven_repos = PackedStringArray()
if not _supports_platform(platform):
return maven_repos
if _is_vendor_plugin_enabled() and not _is_android_aar_file_available(debug) and _plugin_version.ends_with("-SNAPSHOT"):
maven_repos.append("https://s01.oss.sonatype.org/content/repositories/snapshots/")
return maven_repos

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:26f362bafe639d182bf6f7efb0a9aefc0bebf013980031f7f6ad7f6c5330cd86
size 912568

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0f6c924193505d9b73764c1a495f3a41799b4226a22e0a4ef116e0082fe8a9ff
size 891368

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d884b9973d9c35a3e4080931d66787ed3b925c686118ccfeead281f795cc43ee
size 1676800

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8bf90daffe7b97b6f8526af400246806f6c28fc91b0af160f48a98f183363edc
size 1682944

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d884b9973d9c35a3e4080931d66787ed3b925c686118ccfeead281f795cc43ee
size 1676800

View File

@ -1,23 +0,0 @@
@tool
extends "../godot_openxr_export_plugin.gd".GodotOpenXREditorExportPlugin
func _get_android_manifest_activity_element_contents(platform, debug) -> String:
if not _supports_platform(platform) or not(_is_vendor_plugin_enabled()):
return ""
var contents = """
<intent-filter>\n
<action android:name=\"android.intent.action.MAIN\" />\n
<category android:name=\"android.intent.category.LAUNCHER\" />\n
\n
<!-- OpenXR category tag to indicate the activity starts in an immersive OpenXR mode. \n
See https://registry.khronos.org/OpenXR/specs/1.0/html/xrspec.html#android-runtime-category. -->\n
<category android:name=\"org.khronos.openxr.intent.category.IMMERSIVE_HMD\" />\n
\n
<!-- Enable VR access on HTC Vive Focus devices. -->\n
<category android:name=\"com.htc.intent.category.VRAPP\" />\n
</intent-filter>\n
"""
return contents

View File

@ -0,0 +1,18 @@
[configuration]
entry_symbol = "plugin_library_init"
compatibility_minimum = "4.2"
android_aar_plugin = true
[libraries]
android.debug.arm64 = "res://addons/godotopenxrvendors/khronos/.bin/debug/arm64-v8a/libgodotopenxrkhronos.so"
android.release.arm64 = "res://addons/godotopenxrvendors/khronos/.bin/release/arm64-v8a/libgodotopenxrkhronos.so"
android.debug.x86_64 = "res://addons/godotopenxrvendors/khronos/.bin/debug/x86_64/libgodotopenxrkhronos.so"
android.release.x86_64 = "res://addons/godotopenxrvendors/khronos/.bin/release/x86_64/libgodotopenxrkhronos.so"
macos.debug = "res://addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.macos.template_debug.framework"
macos.release = "res://addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.macos.template_release.framework"
windows.debug.x86_64 = "res://addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.windows.template_debug.x86_64.dll"
windows.release.x86_64 = "res://addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.windows.template_release.x86_64.dll"
linux.debug.x86_64 = "res://addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.linux.template_debug.x86_64.so"
linux.release.x86_64 = "res://addons/godotopenxrvendors/khronos/.bin/libgodotopenxrkhronos.linux.template_release.x86_64.so"

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2559fb3d21e335f6b69322c499f30152e72d50379d0d659f3ca984e5df8b76e8
size 904376

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:18cd089d0f38393962c49bb32681d66be22341cf9bc22bd8a0dd71da391acf91
size 883176

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:906d6bd4955dacc673f04e542773f88386ab4be7d2d504aed1207c97e7d3922e
size 1672704

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cf246430cc976618365cdee9498b352b011acd86d75fdfbda293667c1a0781e5
size 1675776

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:906d6bd4955dacc673f04e542773f88386ab4be7d2d504aed1207c97e7d3922e
size 1672704

View File

@ -1,20 +0,0 @@
@tool
extends "../godot_openxr_export_plugin.gd".GodotOpenXREditorExportPlugin
func _get_android_manifest_activity_element_contents(platform, debug) -> String:
if not _supports_platform(platform) or not(_is_vendor_plugin_enabled()):
return ""
var contents = """
<intent-filter>\n
<action android:name=\"android.intent.action.MAIN\" />\n
<category android:name=\"android.intent.category.LAUNCHER\" />\n
\n
<!-- OpenXR category tag to indicate the activity starts in an immersive OpenXR mode. \n
See https://registry.khronos.org/OpenXR/specs/1.0/html/xrspec.html#android-runtime-category. -->\n
<category android:name=\"org.khronos.openxr.intent.category.IMMERSIVE_HMD\" />\n
</intent-filter>\n
"""
return contents

View File

@ -0,0 +1,16 @@
[configuration]
entry_symbol = "plugin_library_init"
compatibility_minimum = "4.2"
android_aar_plugin = true
[libraries]
android.debug.arm64 = "res://addons/godotopenxrvendors/lynx/.bin/debug/arm64-v8a/libgodotopenxrlynx.so"
android.release.arm64 = "res://addons/godotopenxrvendors/lynx/.bin/release/arm64-v8a/libgodotopenxrlynx.so"
macos.debug = "res://addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.macos.template_debug.framework"
macos.release = "res://addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.macos.template_release.framework"
windows.debug.x86_64 = "res://addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.windows.template_debug.x86_64.dll"
windows.release.x86_64 = "res://addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.windows.template_release.x86_64.dll"
linux.debug.x86_64 = "res://addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.linux.template_debug.x86_64.so"
linux.release.x86_64 = "res://addons/godotopenxrvendors/lynx/.bin/libgodotopenxrlynx.linux.template_release.x86_64.so"

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:412fb9932adf31a0db9adbefb190ac9241003ed9166abb2714e9065dec3f0767
size 719904
oid sha256:4cbacbc1657bfcb0352b6a8d7abbdcf515ffdd81c0f0413d4aa57fb2007ff581
size 1105296

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fc9c79f67a780456530834388a9112bb5d0aec70775e051c211bde30912ec805
size 711152
oid sha256:304291cbe35cb725e34f23a111b150cb0f5fa3152581412f9b7b3600b1f542e8
size 1071624

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7cee1054aae5929644ebe34ee27870f5d5b75a9062c45c2ff650573e68adea89
size 1533440
oid sha256:1a6d5e0e480c32edc33a6fb08ac5e66fd8878499bbe9b9427b53330cfba1fdcd
size 1841152

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6acd70ae65a48332a57014b8d8998bd486fe514df96bcff80bbe6488a86e7772
size 1529344
oid sha256:31bbebac4bfebc45e47bd00b2c12c52940672712eeedf1d7ef876f111fb1c466
size 1840128

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7cee1054aae5929644ebe34ee27870f5d5b75a9062c45c2ff650573e68adea89
size 1533440
oid sha256:1a6d5e0e480c32edc33a6fb08ac5e66fd8878499bbe9b9427b53330cfba1fdcd
size 1841152

View File

@ -1,300 +0,0 @@
@tool
extends "../godot_openxr_export_plugin.gd".GodotOpenXREditorExportPlugin
const EYE_TRACKING_NONE_VALUE = 0
const EYE_TRACKING_OPTIONAL_VALUE = 1
const EYE_TRACKING_REQUIRED_VALUE = 2
const PASSTHROUGH_NONE_VALUE = 0
const PASSTHROUGH_OPTIONAL_VALUE = 1
const PASSTHROUGH_REQUIRED_VALUE = 2
const HAND_TRACKING_NONE_VALUE = 0
const HAND_TRACKING_OPTIONAL_VALUE = 1
const HAND_TRACKING_REQUIRED_VALUE = 2
const HAND_TRACKING_FREQUENCY_LOW_VALUE = 0
const HAND_TRACKING_FREQUENCY_HIGH_VALUE = 1
const EYE_TRACKING_OPTION = {
"option": {
"name": "meta_xr_features/eye_tracking",
"class_name": "",
"type": TYPE_INT,
"hint": PROPERTY_HINT_ENUM,
"hint_string": "None,Optional,Required",
"usage": PROPERTY_USAGE_DEFAULT,
},
"default_value": EYE_TRACKING_NONE_VALUE,
"update_visibility": false,
}
const HAND_TRACKING_OPTION = {
"option": {
"name": "meta_xr_features/hand_tracking",
"class_name": "",
"type": TYPE_INT,
"hint": PROPERTY_HINT_ENUM,
"hint_string": "None,Optional,Required",
"usage": PROPERTY_USAGE_DEFAULT,
},
"default_value": HAND_TRACKING_NONE_VALUE,
"update_visibility": false,
}
const HAND_TRACKING_FREQUENCY_OPTION = {
"option": {
"name": "meta_xr_features/hand_tracking_frequency",
"class_name": "",
"type": TYPE_INT,
"hint": PROPERTY_HINT_ENUM,
"hint_string": "Low,High",
"usage": PROPERTY_USAGE_DEFAULT,
},
"default_value": HAND_TRACKING_FREQUENCY_LOW_VALUE,
"update_visibility": false,
}
const PASSTHROUGH_OPTION = {
"option": {
"name": "meta_xr_features/passthrough",
"class_name": "",
"type": TYPE_INT,
"hint": PROPERTY_HINT_ENUM,
"hint_string": "None,Optional,Required",
"usage": PROPERTY_USAGE_DEFAULT,
},
"default_value": PASSTHROUGH_NONE_VALUE,
"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",
"class_name": "",
"type": TYPE_BOOL,
"hint": PROPERTY_HINT_NONE,
"hint_string": "",
"usage": PROPERTY_USAGE_DEFAULT,
},
"default_value": false,
"update_visibility": false,
}
const SUPPORT_QUEST_2_OPTION = {
"option": {
"name": "meta_xr_features/quest_2_support",
"class_name": "",
"type": TYPE_BOOL,
"hint": PROPERTY_HINT_NONE,
"hint_string": "",
"usage": PROPERTY_USAGE_DEFAULT,
},
"default_value": true,
"update_visibility": false,
}
const SUPPORT_QUEST_3_OPTION = {
"option": {
"name": "meta_xr_features/quest_3_support",
"class_name": "",
"type": TYPE_BOOL,
"hint": PROPERTY_HINT_NONE,
"hint_string": "",
"usage": PROPERTY_USAGE_DEFAULT,
},
"default_value": true,
"update_visibility": false,
}
const SUPPORT_QUEST_PRO_OPTION = {
"option": {
"name": "meta_xr_features/quest_pro_support",
"class_name": "",
"type": TYPE_BOOL,
"hint": PROPERTY_HINT_NONE,
"hint_string": "",
"usage": PROPERTY_USAGE_DEFAULT,
},
"default_value": true,
"update_visibility": false,
}
func _get_export_options(platform) -> Array[Dictionary]:
if not _supports_platform(platform):
return []
return [
_get_vendor_toggle_option(),
EYE_TRACKING_OPTION,
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,
SUPPORT_QUEST_PRO_OPTION,
]
func _get_supported_devices() -> PackedStringArray:
var supported_devices = PackedStringArray()
if _get_bool_option("meta_xr_features/quest_1_support"):
supported_devices.append("quest")
if _get_bool_option("meta_xr_features/quest_2_support"):
supported_devices.append("quest2")
if _get_bool_option("meta_xr_features/quest_3_support"):
supported_devices.append("quest3")
if _get_bool_option("meta_xr_features/quest_pro_support"):
supported_devices.append("questpro")
return supported_devices
func _is_eye_tracking_enabled() -> bool:
var eye_tracking_project_setting_enabled = ProjectSettings.get_setting_with_override("xr/openxr/extensions/eye_gaze_interaction")
if not(eye_tracking_project_setting_enabled):
return false
var eye_tracking_option_value = _get_int_option("meta_xr_features/eye_tracking", EYE_TRACKING_NONE_VALUE)
return eye_tracking_option_value > EYE_TRACKING_NONE_VALUE
func _get_export_features(platform, debug) -> PackedStringArray:
var features = PackedStringArray()
if not _supports_platform(platform):
return features
# Add the eye tracking feature if necessary
if _is_eye_tracking_enabled():
features.append(globals.EYE_GAZE_INTERACTION_FEATURE)
return features
func _get_export_option_warning(platform, option) -> String:
if not _supports_platform(platform):
return ""
var warning = ""
var openxr_enabled = _is_openxr_enabled()
match (option):
"meta_xr_features/eye_tracking":
var eye_tracking_project_setting_enabled = ProjectSettings.get_setting_with_override("xr/openxr/extensions/eye_gaze_interaction")
var eye_tracking_option_value = _get_int_option("meta_xr_features/eye_tracking", EYE_TRACKING_NONE_VALUE)
if eye_tracking_option_value > EYE_TRACKING_NONE_VALUE and not(eye_tracking_project_setting_enabled):
warning = "\"Eye Tracking\" project setting must be enabled!\n"
"meta_xr_features/hand_tracking":
if not(openxr_enabled) and _get_int_option(option, HAND_TRACKING_NONE_VALUE) > HAND_TRACKING_NONE_VALUE:
warning = "\"Hand Tracking\" requires \"XR Mode\" to be \"OpenXR\".\n"
"meta_xr_features/passthrough":
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)
return warning
func _get_android_manifest_element_contents(platform, debug) -> String:
if not _supports_platform(platform) or not(_is_vendor_plugin_enabled()):
return ""
var contents = ""
# Check for eye tracking
if _is_eye_tracking_enabled():
contents += " <uses-permission android:name=\"com.oculus.permission.EYE_TRACKING\" />\n"
var eye_tracking_value = _get_int_option("meta_xr_features/eye_tracking", EYE_TRACKING_NONE_VALUE)
if eye_tracking_value == EYE_TRACKING_OPTIONAL_VALUE:
contents += " <uses-feature android:name=\"oculus.software.eye_tracking\" android:required=\"false\" />\n"
elif eye_tracking_value == EYE_TRACKING_REQUIRED_VALUE:
contents += " <uses-feature android:name=\"oculus.software.eye_tracking\" android:required=\"true\" />\n"
# Check for hand tracking
var hand_tracking_value = _get_int_option("meta_xr_features/hand_tracking", HAND_TRACKING_NONE_VALUE)
if hand_tracking_value > HAND_TRACKING_NONE_VALUE:
contents += " <uses-permission android:name=\"com.oculus.permission.HAND_TRACKING\" />\n"
if hand_tracking_value == HAND_TRACKING_OPTIONAL_VALUE:
contents += " <uses-feature tools:node=\"replace\" android:name=\"oculus.software.handtracking\" android:required=\"false\" />\n"
elif hand_tracking_value == HAND_TRACKING_REQUIRED_VALUE:
contents += " <uses-feature tools:node=\"replace\" android:name=\"oculus.software.handtracking\" android:required=\"true\" />\n"
# Check for passthrough
var passthrough_mode = _get_int_option("meta_xr_features/passthrough", PASSTHROUGH_NONE_VALUE)
if passthrough_mode == PASSTHROUGH_OPTIONAL_VALUE:
contents += " <uses-feature tools:node=\"replace\" android:name=\"com.oculus.feature.PASSTHROUGH\" android:required=\"false\" />\n"
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
func _get_android_manifest_application_element_contents(platform, debug) -> String:
if not _supports_platform(platform) or not(_is_vendor_plugin_enabled()):
return ""
var contents = ""
var supported_devices = "|".join(_get_supported_devices())
contents += " <meta-data tools:node=\"replace\" android:name=\"com.oculus.supportedDevices\" android:value=\"%s\" />\n" % supported_devices
var hand_tracking_enabled = _get_int_option("meta_xr_features/hand_tracking", HAND_TRACKING_NONE_VALUE) > HAND_TRACKING_NONE_VALUE
if hand_tracking_enabled:
var hand_tracking_frequency = _get_int_option("meta_xr_features/hand_tracking_frequency", HAND_TRACKING_FREQUENCY_LOW_VALUE)
var hand_tracking_frequency_label = "LOW" if hand_tracking_frequency == HAND_TRACKING_FREQUENCY_LOW_VALUE else "HIGH"
contents += " <meta-data tools:node=\"replace\" android:name=\"com.oculus.handtracking.frequency\" android:value=\"%s\" />\n" % hand_tracking_frequency_label
contents += " <meta-data tools:node=\"replace\" android:name=\"com.oculus.handtracking.version\" android:value=\"V2.0\" />\n"
return contents
func _get_android_manifest_activity_element_contents(platform, debug) -> String:
if not _supports_platform(platform) or not(_is_vendor_plugin_enabled()):
return ""
var contents = """
<intent-filter>\n
<action android:name=\"android.intent.action.MAIN\" />\n
<category android:name=\"android.intent.category.LAUNCHER\" />\n
\n
<!-- Enable access to OpenXR on Oculus mobile devices, no-op on other Android\n
platforms. -->\n
<category android:name=\"com.oculus.intent.category.VR\" />\n
\n
<!-- OpenXR category tag to indicate the activity starts in an immersive OpenXR mode. \n
See https://registry.khronos.org/OpenXR/specs/1.0/html/xrspec.html#android-runtime-category. -->\n
<category android:name=\"org.khronos.openxr.intent.category.IMMERSIVE_HMD\" />\n
</intent-filter>\n
"""
return contents

View File

@ -14,7 +14,3 @@ windows.debug.x86_64 = "res://addons/godotopenxrvendors/meta/.bin/libgodotopenxr
windows.release.x86_64 = "res://addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.windows.template_release.x86_64.dll"
linux.debug.x86_64 = "res://addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.linux.template_debug.x86_64.so"
linux.release.x86_64 = "res://addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.linux.template_release.x86_64.so"
linux.debug.arm64 = "res://addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.linux.template_debug.arm64.so"
linux.release.arm64 = "res://addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.linux.template_release.arm64.so"
linux.debug.rv64 = "res://addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.linux.template_debug.rv64.so"
linux.release.rv64 = "res://addons/godotopenxrvendors/meta/.bin/libgodotopenxrmeta.linux.template_release.rv64.so"

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0e4b1ec6b67b7dd1683b6d0b96079b0443946eb6a836f1a372974053aad721a8
size 904376

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6b466b78078a8be5de46b0293fb24f90a17ce911e8a0fb010469f084fb5719d3
size 883176

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f63bc9eac6eef5126e756c3fd168205d859ae96ad9be9ace673ce1ba05fa5d7c
size 1672704

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7e58ea69d21c2b234a344bed15228e9f17beb0c8f8ae16d70ecfe3fe8085b2ae
size 1675776

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f63bc9eac6eef5126e756c3fd168205d859ae96ad9be9ace673ce1ba05fa5d7c
size 1672704

View File

@ -1,20 +0,0 @@
@tool
extends "../godot_openxr_export_plugin.gd".GodotOpenXREditorExportPlugin
func _get_android_manifest_activity_element_contents(platform, debug) -> String:
if not _supports_platform(platform) or not(_is_vendor_plugin_enabled()):
return ""
var contents = """
<intent-filter>\n
<action android:name=\"android.intent.action.MAIN\" />\n
<category android:name=\"android.intent.category.LAUNCHER\" />\n
\n
<!-- OpenXR category tag to indicate the activity starts in an immersive OpenXR mode. \n
See https://registry.khronos.org/OpenXR/specs/1.0/html/xrspec.html#android-runtime-category. -->\n
<category android:name=\"org.khronos.openxr.intent.category.IMMERSIVE_HMD\" />\n
</intent-filter>\n
"""
return contents

View File

@ -0,0 +1,16 @@
[configuration]
entry_symbol = "plugin_library_init"
compatibility_minimum = "4.2"
android_aar_plugin = true
[libraries]
android.debug.arm64 = "res://addons/godotopenxrvendors/pico/.bin/debug/arm64-v8a/libgodotopenxrpico.so"
android.release.arm64 = "res://addons/godotopenxrvendors/pico/.bin/release/arm64-v8a/libgodotopenxrpico.so"
macos.debug = "res://addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.macos.template_debug.framework"
macos.release = "res://addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.macos.template_release.framework"
windows.debug.x86_64 = "res://addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.windows.template_debug.x86_64.dll"
windows.release.x86_64 = "res://addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.windows.template_release.x86_64.dll"
linux.debug.x86_64 = "res://addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.linux.template_debug.x86_64.so"
linux.release.x86_64 = "res://addons/godotopenxrvendors/pico/.bin/libgodotopenxrpico.linux.template_release.x86_64.so"

View File

@ -1,7 +0,0 @@
[plugin]
name="GodotOpenXRVendors"
description="Godot OpenXR Vendors plugin"
author="https://github.com/GodotVR/godot_openxr_vendors/blob/master/CONTRIBUTORS.md"
version="2.0.2-stable"
script="godot_openxr_export_plugin.gd"

View File

@ -1 +1 @@
4.2.stable
4.2.1.stable

View File

@ -8,7 +8,7 @@ custom_features=""
export_filter="all_resources"
include_filter="*.j2,*.woff2"
exclude_filter=""
export_path="builds/android/immersive-home.apk"
export_path="builds/android/immersive-home-debug.apk"
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
@ -219,6 +219,7 @@ meta_xr_features/quest_pro_support=true
xr_features/enable_pico_plugin=false
xr_features/enable_lynx_plugin=false
xr_features/enable_khronos_plugin=false
meta_xr_features/use_scene_api=false
[preset.1]
@ -441,3 +442,4 @@ meta_xr_features/quest_pro_support=true
xr_features/enable_pico_plugin=false
xr_features/enable_lynx_plugin=false
xr_features/enable_khronos_plugin=false
meta_xr_features/use_scene_api=false