Skip to content

Commit 3206e28

Browse files
committed
Ensure that the Android editor properly passes hybrid data when switching mode
1 parent b79fe2e commit 3206e28

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

platform/android/java/app/config.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ext.versions = [
1717
splashscreenVersion: '1.0.1',
1818
// 'openxrLoaderVersion' should be set to XR_CURRENT_API_VERSION, see 'thirdparty/openxr'
1919
openxrLoaderVersion: '1.1.53',
20-
openxrVendorsVersion: '4.2.0-stable',
20+
openxrVendorsVersion: '4.2.1-stable',
2121
junitVersion : '1.3.0',
2222
espressoCoreVersion: '3.7.0',
2323
kotlinTestVersion : '1.3.11',

platform/android/java/editor/src/main/java/org/godotengine/editor/BaseGodotEditor.kt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,10 +270,11 @@ abstract class BaseGodotEditor : GodotActivity(), GameMenuFragment.GameMenuListe
270270
newIntent.putExtra(EXTRA_NEW_LAUNCH, false)
271271

272272
godot?.runOnRenderThread {
273-
// Look for the scene and xr-mode arguments
273+
// Look for the scene, XR-mode, and hybrid data arguments.
274274
var scene = ""
275275
var xrMode = XR_MODE_DEFAULT
276276
var path = ""
277+
var base64HybridData = ""
277278
if (params.isNotEmpty()) {
278279
val sceneIndex = params.indexOf(SCENE_ARG)
279280
if (sceneIndex != -1 && sceneIndex + 1 < params.size) {
@@ -289,9 +290,14 @@ abstract class BaseGodotEditor : GodotActivity(), GameMenuFragment.GameMenuListe
289290
if (pathIndex != -1 && pathIndex + 1 < params.size) {
290291
path = params[pathIndex + 1]
291292
}
293+
294+
val hybridDataIndex = params.indexOf(HYBRID_DATA_ARG)
295+
if (hybridDataIndex != -1 && hybridDataIndex + 1 < params.size) {
296+
base64HybridData = params[hybridDataIndex + 1]
297+
}
292298
}
293299

294-
val sceneArgs = mutableSetOf(XR_MODE_ARG, xrMode).apply {
300+
val sceneArgs = mutableSetOf(XR_MODE_ARG, xrMode, HYBRID_DATA_ARG, base64HybridData).apply {
295301
if (path.isNotEmpty() && scene.isEmpty()) {
296302
add(PATH_ARG)
297303
add(path)

0 commit comments

Comments
 (0)