When you export the game, there is an option Convert text scenes to binary on export.
If it's turned on, .tscn
files are changed to .tscn.converted.scn
.
It seems most paths in scenes/scripts/resources are substituted, but if you have a bit of code that builds the path from parts, it can slip through the cracks.
This is how i handled it in my project.
const SCENETYPE = ['tscn.converted.scn', 'scn', 'tscn']
func load_scene_instance(name, dir=''):
var file = File.new()
var path = ''
var scene = null
for ext in SCENETYPE:
path = 'res://%s%s.%s' % [dir, name, ext]
if file.file_exists(path):
scene = load(path).instance()
break
return scene