This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

Something must be slipping my brain, because I can't recall having this issue before.

I exported a project, and there is an error in game where it refuses to load or preload an instance by the path I gave it.

Works fine from the editor.

I even tried checking the file extensions and substituting *.tscn.converted.scn

Checking the load values reveals it's null after the load. The file_exists() on the given path reports True.

in Engine by (5,286 points)

try it again after deleting temporary cache files under ~/.godot/tmp

Thanks. Gave it a shot. Didn't work.

I walked back everything I did last night, and the one change that caused this though was that in the export exclusion filters I put *.png to exclude the extra image files. And when I add that filter the .tscn can't be found by preload in the main scene of the exported game, but get rid of it, and then it can...

Maybe you have an insight into this?

just put *.png to exclude? that will exclude all png files in your project.
that might cause an error when loading scene has reference to it.
are the unwanted png files in a certain directory?

I see, now that you mention it, I do think there was reference to a PNG that I had lingering about for testing. Some icon that isn't shown, but was loaded via code somewhere. I would bet on that.

So I'm imagining the error was actually somewhere further upstream, if it failed to get that PNG. Does that sound plausible?

I will have to test it out again tonight when I get some time.

Thanks volzhs.

do you have any preload("some.png") in your code?

Yeah, it's a load in some included script.

var icon = load(script_path + "/icons/object.png")

Was just some icon that I stopped using. Everything else was running fine in the built game, so I think I was fixated on the instance that was clearly there, but failing to preload.

One thing that made this difficult to track down was that sometimes when I made certain changes that created more fatal errors, the game would start up and close immediately, so I couldn't get a chance to read the console.

Is there way to suspend or log the debug console on exported games?

I think you can see logs when game runs on terminal.

I'm using Windows, do you mean executing it from a command line prompt?

yeap. (I should write more than 12 characters...)


I gave it a whirl, and had success. That will save me some tears in the future.

As usual, thanks again for your time and the help.

Please log in or register to answer this question.

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 Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.