-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Fix loss of gdextension on editor startup #98041
Fix loss of gdextension on editor startup #98041
Conversation
This should also fix #97962 |
Thanks for the fast PR. When I checked it out I also found no way to exclude |
Exactly! We will see what reviewers think about that. |
This also fixes gdextensions not loading on android: #98056 |
I think we should rename and attempt to modify ResourceLoader::get_recognized_extensions_for_type to not return .res and .tres for GDExtension Or at least see that its too difficult |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code seems fine.
This fixes a few GDExtension regressions, so it would be nice to get it merged soon.
It's sounds like a bug to me that the method returns .res and .tres for GDExtension.
It's not exactly a bug. ResourceFormatLoaderText/Binary handle any type of Resource (because you can save/load everything as .res or .tres), and that's where these extensions come from.
I haven't tested it, but I don't think re-saving a |
It's similar issue to #34080 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: NetroScript <[email protected]>"
f8f0c7d
to
fbd1643
Compare
As suggested by @fire, I modified code to prevent |
Thanks! |
MainLoop
does not work if .godot is already generated #97962The GDExtension files were not processed in
EditorFileSystem::_first_scan_process_scripts
following optimization in #95678.Thanks to @NetroScript to pinpoint the problem and find the solution. This PR is based on it's suggested modifications. That's why I added him as Coauthor.
I think your approach to use
ResourceLoader::get_recognized_extensions_for_type
is the right one. It's sounds like a bug to me that the method returns.res
and.tres
for GDExtension. I'm not an expert of the GDExtensions but I'm pretty sure.res
and.tres
are not supported for GDExtensions. If you check intoGDExtensionLibraryLoader::parse_gdextension_file
, it only supports a ConfigFile format and not a resource file. It does not seems easy to modifyResourceLoader::get_recognized_extensions_for_type
to not return.res
and.tres
for GDExtension and I'm worry about side effects so I think that excluding.res
and.tres
extensions in_first_scan_filesystem
seems the right way to me.Edited: Adding #97962 in the fixed issue list.
Edited: Adding #98056 in the fixed issue list.