|
@@ -197,6 +197,8 @@ String _get_xr_features_tag(const Ref<EditorExportPreset> &p_preset) {
|
|
|
String manifest_xr_features;
|
|
|
bool uses_xr = (int)(p_preset->get("xr_features/xr_mode")) == 1;
|
|
|
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
|
|
|
if (hand_tracking_index == 1) {
|
|
|
manifest_xr_features += " <uses-feature tools:node=\"replace\" android:name=\"oculus.software.handtracking\" android:required=\"false\" />\n";
|
|
@@ -228,7 +230,9 @@ String _get_activity_tag(const Ref<EditorExportPreset> &p_preset) {
|
|
|
"tools:replace=\"android:screenOrientation\" "
|
|
|
"android:screenOrientation=\"%s\">\n",
|
|
|
orientation);
|
|
|
- if (!uses_xr) {
|
|
|
+ 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";
|