-
-
Notifications
You must be signed in to change notification settings - Fork 22k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
global_script_class_cache.cfg doesn't get properly generated if extension_list.cfg doesn't exist on first load #77478
Comments
It happens to me also on Godot_v4.0.3-stable_macos.universal |
Tips from bitwes/Gut#520 (comment) godot --project . --headless --quit-after 200 -e 2>/dev/null
godot --headless ... Don't fix the initial issue but can make a workaround |
I tested the MRP with a build from master now that #92303 is merge. Godot does not crash on editor start if the The only error I get is this one and I need to restart the editor to fix it: It comes from the fact that if |
Yeah this error sounds related to #53163, which was closed as presumably fixed but I never confirmed it myself. I always thought restarting the editor once when loading a project with a GDExtension was still the "normal" workflow, like for plugins. |
Indeed, restarting the editor seems the preferred workflow. After a bit of investigation, it does not sound a good idea to modify that behavior. |
Well it's the preferred workflow due to bugs - ideally we should be able to resolve all imports and dependencies thereof on the first edit of a project, so that it works out of the box. |
I totally agree with you, the process should be a lot smoother. I did some modifications locally to make it work but I'm really not sure it will cover all possibilities. Maybe later I'll create a PR just to have some feedbacks, who knowns! |
Godot version
Tested with 4.0, 4.0.1, 4.0.2 and 4.0.3 Mono editions
System information
Tested on several Windows PCs and a Mac
Issue description
When the
.godot
folder doesn't exist and you have a gdextension in your project, the first launch causes a crash and causesglobal_script_class_cache.cfg
to not generate correctly, breaking all gdscripts until you force theclass_name
on every script to re-register in the cache. (by commentingclass_name
out, save, uncomment, save, on every gd script).Suggested workaround if you're working with git
Allow
./godot/extension_list.cfg
in your.gitignore
.Steps to reproduce
.godot
folder doesn't existMinimal reproduction project
This can be reproduced with a modified demo from
godot-cpp
, here is one compiled for Windows x64.minimal_repro.zip
The project is inside the
demo
directory. I have included a script which contains aclass_name
namedscript_with_class_name.gd
.godot
folder, noglobal_script_class_cache.cfg
exists.godot
folder again,global_script_class_cache.cfg
exists now, but it does not have the class name in there.The text was updated successfully, but these errors were encountered: