-
Notifications
You must be signed in to change notification settings - Fork 60
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
Cannot export library to Android platform #56
Comments
Hmm. EditorInspectorPlugin is a type that should only be used in the editor context, not in an exported game... I think this is probably happening because we have type hints that reference the EditorInspectorPlugin class name in a few of our classes like ResourceCollection. If you have it in your project anywhere (regardless of whether you are using it), then it will trigger an error with a fully exported game since the EditorInspectorPlugin class doesn't exist in release builds of the engine. |
@Destarianon Can you pull from the latest master (or just change the type hints in CallbackDelegator and ResourceCollection to use Reference instead of EditorInspectorPlugin) and then see if the issue is resolved? Edit: For reference, the commit is 795c60f. |
Pulled the latest master and that did not resolve the issue. These are debug builds being sent via one-click deployment. From a logcat of running this on a physical device it appears that it's failing to load the following files in order:
Once those files have failed to load it causes the default scene to fail to load and the app just cycles to try again. The error in OP is always the first script error to appear in the logs. The issue does not occur unless a CallbackDelegator node has been included in the project. |
Not sure if this is it, but... ResourceCollection, which ResourceSet extends, and CallbackDelegator both create an instance of ClassType. ClassType's null constructor has a flag to generate a "deep type map" which was this magical nonsense I wrote a long time ago to be able to load scripts by name based on transformations to their filename, e.g. "my_class.gd" could be accessed with "MyClass". That feature predates the script class system though and honestly is too magical to be kept in there. I think the fix will be to remove the deep type map functionality entirely since generating it involves going out and messing with scripts all over the project folder (even ones which may only be purposeful towards tool work in the editor context, hence the error, probably). I haven't used it in an exported project which is probably why no one has noticed it before. |
I'll try to work on the fix in the newly made In the meantime, you could try just changing the null constructor's default value to set the |
Disabling the "deep type map" default in the null constructor of ClassType did not resolve the issue. At the moment, I will need to disable the library as my code has to run against an android device to test mobile specific functionality. If I need to further test changes against an Android device let me know. |
When using the libraries, all exports to the Android platform fail with the error:
SCRIPT ERROR: Parse Error: The identifier "EditorInspectorPlugin" isn't a valid type (not a script or class), or couldn't be found on base "self".
The text was updated successfully, but these errors were encountered: