-
-
Notifications
You must be signed in to change notification settings - Fork 19.5k
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 try to load addon before it import it all resources. #39313
Comments
I work around it, by just change all my graphic assets to atlases. |
@jebedaia360 Using atlases sounds like a useful workaround of the underlying issue--would you be able to give a brief explanation of how you did that? This seems to be the commit that changed but it wasn't immediately apparent how it worked: rakugoteam/Rakugo-Dialogue-System@87eeaf4 After further reading I'm guessing the relevant part is here: rakugoteam/Rakugo-Dialogue-System@87eeaf4#diff-a72a87a94b7682824d242b0e1358764fL138 So it seems maybe the change to using a (It's still reasonable to consider the underlying issue an engine bug in need of fixing though--particularly if there's other resources where an equivalent workaround isn't available.) Edit: Now I'm reminded of it, I guess using an atlas is similar to the approach I took here: follower/godot-camera-plugin-demo@2d7db76#diff-d749e27f47e3083735056a69118dc89f but with the key difference that there's no direct loading of the diff --git a/addons/godot-camera-plugin.funabab/plugin.gd b/addons/godot-camera-plugin.funabab/plugin.gd
index f93656b..3a42c89 100644
--- a/addons/godot-camera-plugin.funabab/plugin.gd
+++ b/addons/godot-camera-plugin.funabab/plugin.gd
@@ -5,7 +5,13 @@ const ANDROID_MODULE = "org/godotengine/godot/funabab/camera/FunababCameraPlugin
const CUSTOM_NODE_NAME = "CameraView";
func _enter_tree():
- add_custom_type(CUSTOM_NODE_NAME, "Control", preload("camera_view.gd"), preload("icon_node.png"));
+ var custom_icon: Image = Image.new()
+ custom_icon.load("res://addons/godot-camera-plugin.funabab/icon_node.png")
+
+ var custom_icon_texture: ImageTexture = ImageTexture.new()
+ custom_icon_texture.create_from_image(custom_icon)
+
+ add_custom_type(CUSTOM_NODE_NAME, "Control", preload("camera_view.gd"), custom_icon_texture);
pass
func _exit_tree(): (As I recall my patch prevented errors on load but still didn't display the texture correctly when first opened.) |
@follower Yes you are right, so I reopen this issue .
Yes, so I use TexturePacker and their plugin to generate atlases and tres files, but to use TexturePacker with godot you need to buy license or use in 7days trial. Also you don't need to use extends Control
class_name CameraView, "res://addons/godot-camera-plugin.funabab/icon_node.png"
|
@follower I was wrong |
Godot version:
3.2.1
OS/device including version:
Ubuntu 20.04, Windows 10
Issue description:
So I making addon with a lot of resources called Rakugo.
And I publish template project that use it.
When people try to open it for first time it crashes Godot with bug simmilar this:
But when they try to open it once again every thing works fine.
Steps to reproduce:
Minimal reproduction project:
The text was updated successfully, but these errors were encountered: