Change_scene not working in build

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ohmi
:warning: Old Version Published before Godot 3 was released.

Hi,

I am working on a simple 2D game of Android. It has 3 main scenes: A main menu, a level selection, and the level itself. In the editor the transition between scenes works smoothly. But when i export it to Android, it can only change form main menu to level selection, but not to the level itself.

I have tried using change_scene_to, which turned the screen black when a level was selected. So at least i know that the button is working :slight_smile:

Edit
Answered in the form of a comment, so i can’t flag it as the answer

Make sure the casing of the paths to your scenes are correct; Android is case-sensitive, whereas Windows is not. So, if a scene is called This.tscn, loading this.tscn will work on Windows but not on Android.

Calinou | 2016-12-20 13:28

Good to know…
But i aready checked the scene path a few times, as you might expect in this situation.
However, the scene name has a space, maybe that’s the issue. (it’s “Tactical Map.scn”)

Edit: I now changed the scene to “Tactical_Map.scn”.Still the same problem.
I also tried to export as .exe and that doesn’t work either.

Edit_2:
Turns out it was exactly that facepalm one little node tried to preload a texture i had written in lower case letters, failed, and caused the whole scene to go → nil
THANKS

ohmi | 2016-12-20 14:26

:bust_in_silhouette: Reply From: ingo_nikot

hello,

im useing the method change_scene(…). i never heard about change_scene_to(…)

Example:

get_tree().change_scene("res://scenes/WorldMapScreen.tscn")

Yeah, I also use change_scene()

change_scene_to()

is for already loaded scenes.

Example:

> var sceneToLoad = preload("res://scenes/Scene_To_Load.scn")
> get_tree().change_scene_to(sceneToLoad)

ohmi | 2016-12-20 19:29

ok thanks but i see your problem was a diffrent issue

ingo_nikot | 2016-12-21 01:56