I found the issue! It turns out the issue was just a minor typo. In ButtonOptions.gd, on line 9, change the code from: get_node("/root/Director").goto_scene("res://Scenes/OptionsMenu/options.tscn")
to get_node("/root/Director").goto_scene("res://Scenes/OptionsMenu/Options.tscn")
and then it will work.
The issue is that in the path you have the name of the scene in lowercase, while the scene file is uppercase. So changing it from options.tscn
to Options.tscn
in the code fixes the problem. :smile:
I have to admit, this took me awhile to find simply because it only crashed in the exported version. I guess in the editor it loads files regardless of the capitalization, so to the editor options
and Options
apparently look the same when loading scenes, but not for the exported version. I'm pretty sure this is a bug, though I have no idea if it has already been fixed in Godot 3.1 or not.
I had to poke around the source code where the issue was reported to find out that the Godot code that was causing the crash was related to the resource path itself. From there I just had to do check the path against the "copy path" option when you right click the scene in the file browser.
I think changing options
to Options
should fix the issue, as that is what made the scene work when I was testing.