Skip to content

Commit f7a5c61

Browse files
committed
Add the necessary permissions to enable spatial entities
1 parent 84fbb0d commit f7a5c61

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

plugin/src/main/cpp/export/meta_export_plugin.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,8 @@ String MetaEditorExportPlugin::_get_android_manifest_element_contents(const Ref<
406406
}
407407

408408
// Check for anchor api
409-
if ((bool)project_settings->get_setting_with_override("xr/openxr/extensions/meta/anchor_api")) {
409+
if ((bool)project_settings->get_setting_with_override("xr/openxr/extensions/spatial_entity/enabled") ||
410+
(bool)project_settings->get_setting_with_override("xr/openxr/extensions/meta/anchor_api")) {
410411
contents += " <uses-permission android:name=\"com.oculus.permission.USE_ANCHOR_API\" />\n";
411412
}
412413

@@ -416,7 +417,9 @@ String MetaEditorExportPlugin::_get_android_manifest_element_contents(const Ref<
416417
}
417418

418419
// Check for scene api or environment depth
419-
if ((bool)project_settings->get_setting_with_override("xr/openxr/extensions/meta/scene_api") || (bool)project_settings->get_setting_with_override("xr/openxr/extensions/meta/environment_depth")) {
420+
if ((bool)project_settings->get_setting_with_override("xr/openxr/extensions/spatial_entity/enabled") ||
421+
(bool)project_settings->get_setting_with_override("xr/openxr/extensions/meta/scene_api") ||
422+
(bool)project_settings->get_setting_with_override("xr/openxr/extensions/meta/environment_depth")) {
420423
contents += " <uses-permission android:name=\"com.oculus.permission.USE_SCENE\" />\n";
421424
}
422425

0 commit comments

Comments
 (0)