get_tree().change_scene("scene") doesn't work in Android release.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Suleymanov

get_tree().change_scene("scene") works perfectly well for Windows Desktop release, but it kickes me outta game in Android release. I alternatively tried to call scene through variable and even custom _func(), yet no luck.

Is there any alternative way of calling scenes that would work for Android? It’s a bit frustrating to have this problem without apparent reason.

I just tried the alternatives below:

  1. get_tree().change_scene_to(load("scene"))
  2. get_tree().change_scene_to(preload("scene"))

Still no luck.

Suleymanov | 2020-11-15 11:19

Debugger’s “Errors” section returns this message: “The function change_scene() returns a value, but this value is never used”.

Output section returns this message (if that’s related at all):
“scene/resources/resource_format_text.cpp:1190 - res://default_env.tres:1 - Parse Error:
0 param: --xr_mode_regular
1 param: --use_depth_32
2 param: --use_immersive
3 param: --debug_opengl”

Suleymanov | 2020-11-15 11:26

:bust_in_silhouette: Reply From: Suleymanov

SOLVED: a png image in CanvasLayer was causing problem (for no reason though). Once it was removed, change_scene works fine in Android.