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
When a project has an enabled plugin that creates a custom type with an icon, when the icon is retrieved with preload, deleting the project's .godot/imported folder will show this error message popup and disable the plugin:
Unable to load addon script from path: 'res://addons/custom/custom.gd'. This might be due to a code error in that script.
Disabling the addon at 'res://addons/custom/plugin.cfg' to prevent further errors.
ERROR: Unable to open file: res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex.
at: _load_data (scene/resources/texture.cpp:815)
ERROR: Failed loading resource: res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex. Make sure resources have been imported by opening the project in the editor at least once.
at: _load (core/io/resource_loader.cpp:214)
ERROR: Failed loading resource: res://icon.svg. Make sure resources have been imported by opening the project in the editor at least once.
at: _load (core/io/resource_loader.cpp:214)
SCRIPT ERROR: Parse Error: Could not preload resource file "res://icon.svg".
at: GDScript::reload (res://addons/custom/custom.gd:5)
ERROR: Unable to open file: res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex.
at: _load_data (scene/resources/texture.cpp:815)
ERROR: Failed loading resource: res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex. Make sure resources have been imported by opening the project in the editor at least once.
at: _load (core/io/resource_loader.cpp:214)
ERROR: Failed loading resource: res://icon.svg. Make sure resources have been imported by opening the project in the editor at least once.
at: _load (core/io/resource_loader.cpp:214)
SCRIPT ERROR: Parse Error: Could not preload resource file "res://icon.svg".
at: GDScript::reload (res://addons/custom/custom.gd:5)
ERROR: Transient parent has another exclusive child.
at: set_visible (scene/main/window.cpp:466)
The error messages are slightly different on 3.5.1, but there is the same "Unable to load addon script... Disabling the addon" error popup when the .import folder is deleted, but only when the plugin is enabled and the icon is retrieved with preload.
Steps to reproduce
Follow the tutorial to make a plugin that creates a custom type with an icon, by passing the icon to add_custom_type.
Enable the plugin.
Save the project.
Close the Godot editor.
Delete the .godot/imported folder.
Open the project in the Godot editor.
The editor will show several "Unable to open file" "Failed loading resource" "Make sure resources have been imported by opening the project in the editor at least once" errors.
This occurs regardless of whether the script uses load or preload on the icon.
If the plugin script uses preload on the icon,
There will be extra "SCRIPT ERROR: Parse Error: Could not preload resource file" error.
If the plugin script uses preload on the icon,
and the plugin was enabled,
There will be the "Unable to load addon script... Disabling the addon" error message and the plugin will be disabled.
Godot version
v4.0.beta4.official and v3.5.1.stable
System information
Arch Linux
Issue description
When a project has an enabled plugin that creates a custom type with an icon, when the icon is retrieved with
preload
, deleting the project's.godot/imported
folder will show this error message popup and disable the plugin:The error messages are slightly different on 3.5.1, but there is the same "Unable to load addon script... Disabling the addon" error popup when the
.import
folder is deleted, but only when the plugin is enabled and the icon is retrieved withpreload
.Steps to reproduce
add_custom_type
..godot/imported
folder.load
orpreload
on the icon.preload
on the icon,preload
on the icon,Minimal reproduction project
demo.zip
The text was updated successfully, but these errors were encountered: