Skip to content
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

problem with exporting #1

Open
vcircus opened this issue Dec 5, 2023 · 6 comments
Open

problem with exporting #1

vcircus opened this issue Dec 5, 2023 · 6 comments

Comments

@vcircus
Copy link

vcircus commented Dec 5, 2023

Hi, thanks for the nice plugin. Works as I need in the editor. Ran in to a problem with exporting to android: I get the error: "parser error: Could not find type "EditorPlugin" in the current scope. Which points to line 403 in collapsible_container.gd.

Tried it in Godot 4.1, 4.1.1 and 4.2 on a mac and version 4.2 on windows with same result. Tried a few things to fix it but am not much of a programmer :-(
Can you point me in a direction to fix this?
Thanks in advance.
Paul

@ArshvirGoraya
Copy link
Owner

@vcircus
Hey Paul, I can't replicate this error and everything seems to be exporting fine for me for android. Some pictures might help. If you want, you can also create a minimum reproduction project with only relevant stuff and send me a zipped folder of the project IF it contains the error as well. I'm also assuming that you are using version 1.0.0 of this plugin so let me know if that's wrong.

Some information/advice that MAY help

The EditorPlugin is a Godot class that this plugin uses when you want to undo/redo anything related to the CollapsibleContainer (e.g., when you press ctrl+z or ctrl+y) while in the editor. It is NOT needed or used when you're in game - only in the editor.

Because it's not needed in game, you could try to simply comment out that line, export, and then just uncomment that line after exporting. Let me know if that works or not.

Since I can't replicate the issue, I can't really help too much without more information.

@vcircus
Copy link
Author

vcircus commented Dec 6, 2023 via email

@ArshvirGoraya
Copy link
Owner

ArshvirGoraya commented Dec 10, 2023

@vcircus

Hey, there seems to be 2 issues here.

Editor Plugin not being recognized on Android.

This seems like a Godot specific issue and I've filed an issue you can find here: godotengine/godot#86013

  • ANY script trying to use the EditorPlugin class seems to throw this error on Android, not just this plugin.

Workaround: instead of commenting out the line anytime you export to android, simply remove the EditorPlugin type hint:
So instead of this old line var _editor_plugin : EditorPlugin
Use this new line: var _editor_plugin OR var _editor_plugin# : EditorPlugin

sizing_node is null.

I got this error from the zip file you sent.
Fix: It seems that when you enable "Small Deploy with Network FileSystem," it goes away.
Screenshot (33)

With both these changes, I was able to export to android without a problem.

Please let me know if this fixes everything for you since I need to know whether to close this issue or not.

Sorry for not responding faster. Just got a job so can't give this my 100% attention.

@vcircus
Copy link
Author

vcircus commented Dec 10, 2023 via email

@ArshvirGoraya
Copy link
Owner

Found out that it also works if you fill in a number for the custom open size as well as for the custom close size.

Yeah, the problem is the Collapsible node doesn't know what to size to because the sizing_node is not set. However, if you're using custom sizes, then the sizing_node isn't used.

The reason the sizing_node doesn't get set is because it's setter function does not automatically get called without the "Small Deploy with Network FileSystem" being enabled. I have no idea why this is.

The setter function is set_sizing_node_path(node_path). Since it doesn't get called automatically like it should, what you can do instead is call it yourself in some script's ready function. This will ALSO remove the sizing_node is null error. Alternatively, you can just do sizing_node = node_path_of_a_control_node and this TOO will call the set_sizing_node_path() setter function. All in all, the sizing_node's setter function isn't called automatically as it should which is causing the error, but you can set the sizing_node through code to avoid the error.

You shouldn't have to do any of this with the "Small Deploy with Network FileSystem" option enabled though.

P.S. I only tested all of this in one-click deploy exports and not with like an APK export. Would love it if you did a normal export and saw if it works on your phone before reporting that everything is working.

@vcircus
Copy link
Author

vcircus commented Dec 11, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants