-
-
Notifications
You must be signed in to change notification settings - Fork 214
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
"Cannot get class" the first time without running the editor #430
Comments
Do you version this file? |
Yes I do. However I switch between a branch where there are neither godot project nor the godot-rust project and another branch where both are there. So all the However I would suspect the game to work without launching the editor if I coded the scene manually. I am not sure it is related to godot-rust or gdextension though.. |
That is, you don't version it. With "version" I meant "commit to version control", meaning it would be restored upon switching to that branch again.
Yes, but Godot requires the There are possibly some sanity checks or auto-generation we could do (see #420), but in general, these things are dictated by Godot, not by gdext. |
It is versionned as I said. When I switch to the branch with the godot rust project, this file does come back, and is here whenever I try to run the game. The only thing that is removed totally is the .godot folder. On the rust library, it is compiled like it would be the first time. If this is a godot issue, which it probably is, I will move this issue to their repo. Thanks for the help! |
As I wrote: you need to make sure that this file is present whenever you launch Godot. How you achieve that with your branches is up to you.
I think this is by design, even if I don't really like it. But you can gladly bring up the discussion, it might be possible to remove this requirement. Probably the file is needed to track which extensions are being loaded; but an absent file could be understood as "all extensions in the project folder". I'll close this issue then 🙂 |
I made an interesting observation regarding this: I thought this is a great idea, because I'm currently switching between Godot 3 and Godot 4 branches, always deleting the However, my code contains Fortunately it turned out that deleting the Another approach would be to actually version the imported resource files as well. TL;DR surprisingly, versioning only the |
For my issue I actually confused the extension_list.cfg file with another. Keeping this file resolved my issue, but I wanted to avoid version anything in .godot so I just built a script to write it if it does not exist which is fine for my special case but may not be for others |
@bluenote10 godotengine/godot#82554 might be potentially interesting here. Addressing the "code shouldn't run by default in the editor" at the core -- as opposed to our current Of course, the problem may still exist for editor classes that need resources... Maybe it's worth filing an issue in Godot for that? |
This will break as soon as Godot changes the format. Since this file is mostly internal, that's not unlikely. I'd rather ignore the entire folder and un-ignore this specific file; |
I don't really agree, versionning this file is probably worse if godot is updated since it can lead to conflicts with the editor. I prefer to let the all .godot folder up to godot. |
I have a godot project using godot-rust in a branch that I switch in and out frequently. Every time I checkout to the branch, I have to compile the rust project and then open the editor first (
godot -e
). If I run the project withgodot
before I get:MyClass
being the class defined in rust.I think it should be possible to avoid opening the editor to run the project.
Is it a bug?
Thank you all !
The text was updated successfully, but these errors were encountered: