0 votes

My project has a bunch of const SCENE = preload("res://Path/Scene.tscn") style imports. This was all well and good, but now that I'm trying to export a release build for the August 1st game-jam deadline all of my imports fail.

If I export to a zip, I can see that the file names change to res://Path/Scene.tscn.converted.scn, which causes the original preload to fail. But I can't type that into the editor since it doesn't exist at edit-time.

What's the best way to preload resources that works both in the editor and once exported for release?

asked Jul 29, 2017 in Engine by Hammer Bro. (81 points)

1 Answer

0 votes
Best answer

Oops -- figured out what was going on, and it was my fault.

I had excluded *.wav files on my exports because I've been toying around with mono/trimmed .smp files. I forgot to update one of my SampleLibraries to use the .smps, so when I ran things from the editor they worked fine because the .wavs still existed, but when I exported it those files did not exist so that scene failed to load which cascaded into just about everything else failing to load, since I'm preloading everything in a global singleton.

So preloading resources as you would expect does indeed work in both the editor and exported releases: preload("res://Path/File.ext")

answered Jul 29, 2017 by Hammer Bro. (81 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.