You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #55767 from m4gr3d/config_hand_tracking_frequency_master
This commit is contained in:
@@ -836,6 +836,8 @@ void EditorExportPlatformAndroid::_fix_manifest(const Ref<EditorExportPreset> &p
|
||||
bool screen_support_xlarge = p_preset->get("screen/support_xlarge");
|
||||
|
||||
int xr_mode_index = p_preset->get("xr_features/xr_mode");
|
||||
int hand_tracking_index = p_preset->get("xr_features/hand_tracking");
|
||||
int hand_tracking_frequency_index = p_preset->get("xr_features/hand_tracking_frequency");
|
||||
|
||||
bool backup_allowed = p_preset->get("user_data_backup/allow");
|
||||
bool classify_as_game = p_preset->get("package/classify_as_game");
|
||||
@@ -987,6 +989,18 @@ void EditorExportPlatformAndroid::_fix_manifest(const Ref<EditorExportPreset> &p
|
||||
}
|
||||
}
|
||||
|
||||
if (tname == "meta-data" && attrname == "name" && value == "xr_hand_tracking_metadata_name") {
|
||||
if (xr_mode_index == XR_MODE_OPENXR && hand_tracking_index > XR_HAND_TRACKING_NONE) {
|
||||
string_table.write[attr_value] = "com.oculus.handtracking.frequency";
|
||||
}
|
||||
}
|
||||
|
||||
if (tname == "meta-data" && attrname == "value" && value == "xr_hand_tracking_metadata_value") {
|
||||
if (xr_mode_index == XR_MODE_OPENXR && hand_tracking_index > XR_HAND_TRACKING_NONE) {
|
||||
string_table.write[attr_value] = (hand_tracking_frequency_index == XR_HAND_TRACKING_FREQUENCY_LOW ? "LOW" : "HIGH");
|
||||
}
|
||||
}
|
||||
|
||||
iofs += 20;
|
||||
}
|
||||
|
||||
@@ -1008,7 +1022,6 @@ void EditorExportPlatformAndroid::_fix_manifest(const Ref<EditorExportPreset> &p
|
||||
feature_versions.push_back(1);
|
||||
|
||||
// Check for hand tracking
|
||||
int hand_tracking_index = p_preset->get("xr_features/hand_tracking"); // 0: none, 1: optional, 2: required
|
||||
if (hand_tracking_index > XR_HAND_TRACKING_NONE) {
|
||||
feature_names.push_back("oculus.software.handtracking");
|
||||
feature_required_list.push_back(hand_tracking_index == XR_HAND_TRACKING_REQUIRED);
|
||||
@@ -1704,9 +1717,10 @@ void EditorExportPlatformAndroid::get_export_options(List<ExportOption> *r_optio
|
||||
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "graphics/opengl_debug"), false));
|
||||
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "xr_features/xr_mode", PROPERTY_HINT_ENUM, "Regular,OpenXR"), 0));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "xr_features/hand_tracking", PROPERTY_HINT_ENUM, "None,Optional,Required"), 0));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "xr_features/passthrough", PROPERTY_HINT_ENUM, "None,Optional,Required"), 0));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "xr_features/xr_mode", PROPERTY_HINT_ENUM, "Regular,OpenXR"), XR_MODE_REGULAR));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "xr_features/hand_tracking", PROPERTY_HINT_ENUM, "None,Optional,Required"), XR_HAND_TRACKING_NONE));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "xr_features/hand_tracking_frequency", PROPERTY_HINT_ENUM, "Low,High"), XR_HAND_TRACKING_FREQUENCY_LOW));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "xr_features/passthrough", PROPERTY_HINT_ENUM, "None,Optional,Required"), XR_PASSTHROUGH_NONE));
|
||||
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "screen/immersive_mode"), true));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "screen/support_small"), true));
|
||||
|
||||
Reference in New Issue
Block a user