Update the XR manifest configs
Remove the ones provided automatically by the loaders, and the ones enabled by the default on the platform. Fixes https://github.com/GodotVR/godot_openxr_loaders/issues/19
This commit is contained in:
@@ -1076,11 +1076,6 @@ void EditorExportPlatformAndroid::_fix_manifest(const Ref<EditorExportPreset> &p
|
|||||||
Vector<int> feature_versions;
|
Vector<int> feature_versions;
|
||||||
|
|
||||||
if (xr_mode_index == XR_MODE_OPENXR) {
|
if (xr_mode_index == XR_MODE_OPENXR) {
|
||||||
// Set degrees of freedom
|
|
||||||
feature_names.push_back("android.hardware.vr.headtracking");
|
|
||||||
feature_required_list.push_back(true);
|
|
||||||
feature_versions.push_back(1);
|
|
||||||
|
|
||||||
// Check for hand tracking
|
// Check for hand tracking
|
||||||
if (hand_tracking_index > XR_HAND_TRACKING_NONE) {
|
if (hand_tracking_index > XR_HAND_TRACKING_NONE) {
|
||||||
feature_names.push_back("oculus.software.handtracking");
|
feature_names.push_back("oculus.software.handtracking");
|
||||||
|
|||||||
@@ -259,8 +259,6 @@ String _get_xr_features_tag(const Ref<EditorExportPreset> &p_preset) {
|
|||||||
int xr_mode_index = (int)(p_preset->get("xr_features/xr_mode"));
|
int xr_mode_index = (int)(p_preset->get("xr_features/xr_mode"));
|
||||||
bool uses_xr = xr_mode_index == XR_MODE_OPENXR;
|
bool uses_xr = xr_mode_index == XR_MODE_OPENXR;
|
||||||
if (uses_xr) {
|
if (uses_xr) {
|
||||||
manifest_xr_features += " <uses-feature tools:node=\"replace\" android:name=\"android.hardware.vr.headtracking\" android:required=\"true\" android:version=\"1\" />\n";
|
|
||||||
|
|
||||||
int hand_tracking_index = p_preset->get("xr_features/hand_tracking"); // 0: none, 1: optional, 2: required
|
int hand_tracking_index = p_preset->get("xr_features/hand_tracking"); // 0: none, 1: optional, 2: required
|
||||||
if (hand_tracking_index == XR_HAND_TRACKING_OPTIONAL) {
|
if (hand_tracking_index == XR_HAND_TRACKING_OPTIONAL) {
|
||||||
manifest_xr_features += " <uses-feature tools:node=\"replace\" android:name=\"oculus.software.handtracking\" android:required=\"false\" />\n";
|
manifest_xr_features += " <uses-feature tools:node=\"replace\" android:name=\"oculus.software.handtracking\" android:required=\"false\" />\n";
|
||||||
@@ -279,8 +277,6 @@ String _get_xr_features_tag(const Ref<EditorExportPreset> &p_preset) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String _get_activity_tag(const Ref<EditorExportPreset> &p_preset) {
|
String _get_activity_tag(const Ref<EditorExportPreset> &p_preset) {
|
||||||
int xr_mode_index = (int)(p_preset->get("xr_features/xr_mode"));
|
|
||||||
bool uses_xr = xr_mode_index == XR_MODE_OPENXR;
|
|
||||||
String orientation = _get_android_orientation_label(DisplayServer::ScreenOrientation(int(GLOBAL_GET("display/window/handheld/orientation"))));
|
String orientation = _get_android_orientation_label(DisplayServer::ScreenOrientation(int(GLOBAL_GET("display/window/handheld/orientation"))));
|
||||||
String manifest_activity_text = vformat(
|
String manifest_activity_text = vformat(
|
||||||
" <activity android:name=\"com.godot.game.GodotApp\" "
|
" <activity android:name=\"com.godot.game.GodotApp\" "
|
||||||
@@ -291,11 +287,6 @@ String _get_activity_tag(const Ref<EditorExportPreset> &p_preset) {
|
|||||||
bool_to_string(p_preset->get("package/exclude_from_recents")),
|
bool_to_string(p_preset->get("package/exclude_from_recents")),
|
||||||
orientation,
|
orientation,
|
||||||
bool_to_string(bool(GLOBAL_GET("display/window/size/resizable"))));
|
bool_to_string(bool(GLOBAL_GET("display/window/size/resizable"))));
|
||||||
if (uses_xr) {
|
|
||||||
manifest_activity_text += " <meta-data tools:node=\"replace\" android:name=\"com.oculus.vr.focusaware\" android:value=\"true\" />\n";
|
|
||||||
} else {
|
|
||||||
manifest_activity_text += " <meta-data tools:node=\"remove\" android:name=\"com.oculus.vr.focusaware\" />\n";
|
|
||||||
}
|
|
||||||
manifest_activity_text += " </activity>\n";
|
manifest_activity_text += " </activity>\n";
|
||||||
return manifest_activity_text;
|
return manifest_activity_text;
|
||||||
}
|
}
|
||||||
@@ -335,8 +326,6 @@ String _get_application_tag(const Ref<EditorExportPreset> &p_preset, bool p_has_
|
|||||||
hand_tracking_frequency);
|
hand_tracking_frequency);
|
||||||
manifest_application_text += " <meta-data tools:node=\"replace\" android:name=\"com.oculus.handtracking.version\" android:value=\"V2.0\" />\n";
|
manifest_application_text += " <meta-data tools:node=\"replace\" android:name=\"com.oculus.handtracking.version\" android:value=\"V2.0\" />\n";
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
manifest_application_text += " <meta-data tools:node=\"remove\" android:name=\"com.oculus.supportedDevices\" />\n";
|
|
||||||
}
|
}
|
||||||
manifest_application_text += _get_activity_tag(p_preset);
|
manifest_application_text += _get_activity_tag(p_preset);
|
||||||
manifest_application_text += " </application>\n";
|
manifest_application_text += " </application>\n";
|
||||||
|
|||||||
@@ -48,12 +48,6 @@
|
|||||||
android:name="xr_hand_tracking_version_name"
|
android:name="xr_hand_tracking_version_name"
|
||||||
android:value="xr_hand_tracking_version_value"/>
|
android:value="xr_hand_tracking_version_value"/>
|
||||||
|
|
||||||
<!-- Supported Meta devices -->
|
|
||||||
<!-- This is removed by the exporter if the xr mode is not VR. -->
|
|
||||||
<meta-data
|
|
||||||
android:name="com.oculus.supportedDevices"
|
|
||||||
android:value="all" />
|
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".GodotApp"
|
android:name=".GodotApp"
|
||||||
android:label="@string/godot_project_name_string"
|
android:label="@string/godot_project_name_string"
|
||||||
@@ -66,9 +60,6 @@
|
|||||||
android:resizeableActivity="false"
|
android:resizeableActivity="false"
|
||||||
tools:ignore="UnusedAttribute" >
|
tools:ignore="UnusedAttribute" >
|
||||||
|
|
||||||
<!-- Focus awareness metadata is removed at export time if the xr mode is not VR. -->
|
|
||||||
<meta-data android:name="com.oculus.vr.focusaware" android:value="true" />
|
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
|||||||
Reference in New Issue
Block a user