You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-03 16:55:53 +00:00
Ensure that the Android editor properly passes hybrid data when switching mode
This commit is contained in:
@@ -17,7 +17,7 @@ ext.versions = [
|
|||||||
splashscreenVersion: '1.0.1',
|
splashscreenVersion: '1.0.1',
|
||||||
// 'openxrLoaderVersion' should be set to XR_CURRENT_API_VERSION, see 'thirdparty/openxr'
|
// 'openxrLoaderVersion' should be set to XR_CURRENT_API_VERSION, see 'thirdparty/openxr'
|
||||||
openxrLoaderVersion: '1.1.53',
|
openxrLoaderVersion: '1.1.53',
|
||||||
openxrVendorsVersion: '4.2.0-stable',
|
openxrVendorsVersion: '4.2.1-stable',
|
||||||
junitVersion : '1.3.0',
|
junitVersion : '1.3.0',
|
||||||
espressoCoreVersion: '3.7.0',
|
espressoCoreVersion: '3.7.0',
|
||||||
kotlinTestVersion : '1.3.11',
|
kotlinTestVersion : '1.3.11',
|
||||||
|
|||||||
@@ -270,10 +270,11 @@ abstract class BaseGodotEditor : GodotActivity(), GameMenuFragment.GameMenuListe
|
|||||||
newIntent.putExtra(EXTRA_NEW_LAUNCH, false)
|
newIntent.putExtra(EXTRA_NEW_LAUNCH, false)
|
||||||
|
|
||||||
godot?.runOnRenderThread {
|
godot?.runOnRenderThread {
|
||||||
// Look for the scene and xr-mode arguments
|
// Look for the scene, XR-mode, and hybrid data arguments.
|
||||||
var scene = ""
|
var scene = ""
|
||||||
var xrMode = XR_MODE_DEFAULT
|
var xrMode = XR_MODE_DEFAULT
|
||||||
var path = ""
|
var path = ""
|
||||||
|
var base64HybridData = ""
|
||||||
if (params.isNotEmpty()) {
|
if (params.isNotEmpty()) {
|
||||||
val sceneIndex = params.indexOf(SCENE_ARG)
|
val sceneIndex = params.indexOf(SCENE_ARG)
|
||||||
if (sceneIndex != -1 && sceneIndex + 1 < params.size) {
|
if (sceneIndex != -1 && sceneIndex + 1 < params.size) {
|
||||||
@@ -289,9 +290,14 @@ abstract class BaseGodotEditor : GodotActivity(), GameMenuFragment.GameMenuListe
|
|||||||
if (pathIndex != -1 && pathIndex + 1 < params.size) {
|
if (pathIndex != -1 && pathIndex + 1 < params.size) {
|
||||||
path = params[pathIndex + 1]
|
path = params[pathIndex + 1]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val hybridDataIndex = params.indexOf(HYBRID_DATA_ARG)
|
||||||
|
if (hybridDataIndex != -1 && hybridDataIndex + 1 < params.size) {
|
||||||
|
base64HybridData = params[hybridDataIndex + 1]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val sceneArgs = mutableSetOf(XR_MODE_ARG, xrMode).apply {
|
val sceneArgs = mutableSetOf(XR_MODE_ARG, xrMode, HYBRID_DATA_ARG, base64HybridData).apply {
|
||||||
if (path.isNotEmpty() && scene.isEmpty()) {
|
if (path.isNotEmpty() && scene.isEmpty()) {
|
||||||
add(PATH_ARG)
|
add(PATH_ARG)
|
||||||
add(path)
|
add(path)
|
||||||
|
|||||||
Reference in New Issue
Block a user