You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Project works in the editor, after exporting the project it seems that the custom resource loader is not registered.
The error message seems to change if debugging symbols is enabled while exporting.
Error with debug enabled:
SCRIPT ERROR: Invalid call. Nonexistent function 'new' in base 'GDScript'.
at: start_dialogic_dialog (res://main.gd:13)
Without debug:
ERROR: Failed to load script "res://addons/dialogic/Resources/CharacterResourceLoader.gd" with error "Compilation failed".
at: load (modules/gdscript/gdscript.cpp:2943)
npc_character: This is a variable test {variable}
ERROR: No loader found for resource: res://npc_character.dch (expected type: )
at: _load (core/io/resource_loader.cpp:289)
Steps to reproduce
Start the project in the editor -> Everything works.
Export the project -> disable debugging symbols while exporting -> run the project -> Inspect error in console.
So during reading in the documentation in the editor it says:
The registered ResourceFormatLoaders are queried sequentially to find the first one which can handle the file's extension, and then attempt loading. If loading fails, the remaining ResourceFormatLoaders are also attempted.
An optional type_hint can be used to further specify the Resource type that should be handled by the ResourceFormatLoader. Anything that inherits from Resource can be used as a type hint, for example Image.
The cache_mode property defines whether and how the cache should be used or updated when loading the resource. See CacheMode for details.
Returns an empty resource if no ResourceFormatLoader could handle the file, and prints an error if no file is found at the specified path.
GDScript has a simplified @GDScript.load() built-in method which can be used in most situations, leaving the use of ResourceLoader for more advanced scenarios.
Note: If Editor > Export > Convert Text Resources to Binary is true, @GDScript.load() will not be able to read converted files in an exported project. If you rely on run-time loading of files present within the PCK, set Editor > Export > Convert Text Resources to Binary to false.
Note: Relative paths will be prefixed with "res://" before loading, to avoid unexpected results make sure your paths are absolute.
I unchecked the option in the editor:
The behavior did not change and the issue is still there. So the Editor option seems not to work...
In the Export window itself I used the Text (easier debugging) mode
This resulted in a working export.
However is not clear to me why the Text export Mode is now needed.
This new behavior (if intended) results in a really poor user expirence.
In case Text means now there is no compilation to .gdc - this should be discussed why the load functionality changed so drastically.
Tested versions
Current master v4.3.beta.custom_build.b7feebefa
System information
Linux
Issue description
Project works in the editor, after exporting the project it seems that the custom resource loader is not registered.
The error message seems to change if debugging symbols is enabled while exporting.
Error with debug enabled:
Without debug:
Steps to reproduce
Start the project in the editor -> Everything works.
Export the project -> disable debugging symbols while exporting -> run the project -> Inspect error in console.
Minimal reproduction project (MRP)
new-game-project.tar.gz
The text was updated successfully, but these errors were encountered: