Merge pull request #97477 from m4gr3d/update_xr_editor_excluded_permissions

[XR Editor] Update the set of excluded permissions
This commit is contained in:
Rémi Verschelde 2024-09-27 13:53:33 +02:00
commit 58ec7a95a4
No known key found for this signature in database
GPG key ID: C3336907360768E1
2 changed files with 3 additions and 3 deletions

View file

@ -45,14 +45,14 @@ open class GodotEditor : BaseGodotEditor() {
internal val XR_RUN_GAME_INFO = EditorWindowInfo(GodotXRGame::class.java, 1667, ":GodotXRGame") internal val XR_RUN_GAME_INFO = EditorWindowInfo(GodotXRGame::class.java, 1667, ":GodotXRGame")
internal const val USE_SCENE_PERMISSION = "com.oculus.permission.USE_SCENE" internal val USE_SCENE_PERMISSIONS = listOf("com.oculus.permission.USE_SCENE", "horizonos.permission.USE_SCENE")
} }
override fun getExcludedPermissions(): MutableSet<String> { override fun getExcludedPermissions(): MutableSet<String> {
val excludedPermissions = super.getExcludedPermissions() val excludedPermissions = super.getExcludedPermissions()
// The USE_SCENE permission is requested when the "xr/openxr/enabled" project setting // The USE_SCENE permission is requested when the "xr/openxr/enabled" project setting
// is enabled. // is enabled.
excludedPermissions.add(USE_SCENE_PERMISSION) excludedPermissions.addAll(USE_SCENE_PERMISSIONS)
return excludedPermissions return excludedPermissions
} }

View file

@ -69,7 +69,7 @@ open class GodotXRGame: GodotGame() {
val automaticPermissionsRequestEnabled = automaticallyRequestPermissionsSetting.isNullOrEmpty() || val automaticPermissionsRequestEnabled = automaticallyRequestPermissionsSetting.isNullOrEmpty() ||
automaticallyRequestPermissionsSetting.toBoolean() automaticallyRequestPermissionsSetting.toBoolean()
if (automaticPermissionsRequestEnabled) { if (automaticPermissionsRequestEnabled) {
permissionsToEnable.add(USE_SCENE_PERMISSION) permissionsToEnable.addAll(USE_SCENE_PERMISSIONS)
} }
} }