-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Godot 4.3 GDScript export mode breaks exported builds with some addons. #94150
Comments
Pandora dynamically loads type loader scripts to handle certain stuff. If the type loader for resources is valid it loads the resource at the given path which returns the texture. If not it falls back to just returning the string instead of loading it. (and then casting this string to a resource will result in The condition used to determine whether the loader is valid is the following: GDScripts with binary tokens return The question is. Is this an issue on our side or should this be fixed in the addon? I'd say returning @bitbrain |
We should probably document this as note on |
I can confirm that applying this changes to Pandora fixes the issue with binary tokens.
My guess is that with the current implementation of GDScript, the has_source_code works only with plain source code. Making it return |
Maybe something in the vain of
|
I'd include a suggestion to use 'can_instantiate()` for cases where someone needs to check if the script is valid, to avoid cases like Pandora. |
#94527 adds documentation for that. I'd also open a PR against pandora with the fix but it doesn't work right now. Edit: Or maybe that's just an incompatibility between the mrp and the current state of pandora 🤷 |
I'm thinking of it being an addon issue too, getting this with master too (applying the At least we've confirmed it not to be a Godot related issue. |
I'd suggest opening an issue on https://github.com/bitbrain/pandora since it's been confirmed not to be a Godot bug, but an addon-specific one. Thanks everyone for the work debugging this! |
Tested versions
Reproducible in Godot 4.3 beta1 and beta2
System information
Windows 11 - Godot 4.3 beta2 - Any Renderer
Issue description
On Godot 4.3 beta1, the option to compile GDScript code on exported builds got reintroduced.
I'm using @bitbrain's Pandora addon, and I encountered a bug regarding this option:
The addon allows to declare RPG data and then later access it.
When running the project from the editor, everything works as it should, and I can load the png file into a TextureRect
However, if the GDScript export mode is set to
binary tokens
/compressed binary tokens
, the texture won't load:And the console output is
Finally, setting the GDScript export mode to text makes the texture load.
This is the workaround, that only fixes the issue on builds with compiled gdscript files.
bitbrain/pandora#189
Steps to reproduce
Minimal reproduction project (MRP)
issue.zip
The text was updated successfully, but these errors were encountered: