I'm trying to set up a batch file that will run a specific scene from my project (temporarily going to be using a smaller display than usual, and the Godot editor has a ton of negative space that impedes my productivity, so I want to use Notepad++).
When I run godot --editor "C:\Users\dupui\Desktop\Godot\CitySim\2D PoC\Gen2\Gen2Testing.tscn" --upwards
at the prompt though, I get this error:
**ERROR**: Condition "err" is true. Returned: err
At: modules/gdscript/gdscript.cpp:829:load_source_code() - Condition "err" is true. Returned: err
**ERROR**: Cannot load source code from file 'res://2D PoC/Gen2/Scripts/Gen2Testing.gd'.
At: modules/gdscript/gdscript.cpp:2286:load() - Condition "err != OK" is true. Returned: RES()
**ERROR**: Failed loading resource: res://2D PoC/Gen2/Scripts/Gen2Testing.gd. Make sure resources have been imported by opening the project in the editor at least once.
At: core/io/resource_loader.cpp:278:_load() - Condition "found" is true. Returned: RES()
**ERROR**: res://CitySim/2D PoC/Gen2/Gen2Testing.tscn:3 - Parse Error: [ext_resource] referenced nonexistent resource at: res://2D PoC/Gen2/Scripts/Gen2Testing.gd
At: scene/resources/resource_format_text.cpp:440:poll() - res://CitySim/2D PoC/Gen2/Gen2Testing.tscn:3 - Parse Error: [ext_resource] referenced nonexistent resource at: res://2D PoC/Gen2/Scripts/Gen2Testing.gd
**ERROR**: Failed to load resource 'res://CitySim/2D PoC/Gen2/Gen2Testing.tscn'.
At: core/io/resource_loader.cpp:208:load() - Condition "err != OK" is true. Returned: RES()
**ERROR**: Failed loading resource: res://CitySim/2D PoC/Gen2/Gen2Testing.tscn. Make sure resources have been imported by opening the project in the editor at least once.
At: core/io/resource_loader.cpp:278:_load() - Condition "found" is true. Returned: RES()
**ERROR**: Failed loading scene: res://CitySim/2D PoC/Gen2/Gen2Testing.tscn
At: main/main.cpp:1944:start() - Condition "!scene" is true. Returned: false
**WARNING**: ObjectDB instances leaked at exit (run with --verbose for details).
At: core/object.cpp:2135:cleanup() - ObjectDB instances leaked at exit (run with --verbose for details).
This happens if I use --debug
instead of --editor
as well (I would like to be just using --debug
but I'm experimenting with different flags to get it to work.
When I run the scene from in the editor (and I have multiple times, so I'm not sure why the error I'm getting suggests I try that), it opens just fine with no complaints.
The batch file (and the godot.exe) are 1 directory up from the project's .godot file. This directory with the .bat and the .exe is on the path, and my godot.exe is literally named godot.exe
.
I have also tried placing the .gd file attached to the .tscn in the same file as the .tscn, and that returned the same error. I've also tried running the batch file with elevated permissions (make a shortcut, run shortcut as admin), and that also fails to work (and also does not generate a log file on my device). Any advice? Does every file have to be local/embedded in the .tscn file for the command prompt to work? That would really suck.
I don't think any of the --verbose
information is helpful, but I uploaded it to a pastebin here.