gdscript-preprocessor icon indicating copy to clipboard operation
gdscript-preprocessor copied to clipboard

Support 4.3+ binary export format

Open funnbot opened this issue 1 year ago • 1 comments

Just discovered this myself, the docs for EditorExportPlugin._get_name state

Return the name identifier of this plugin (for future identification by the exporter). The plugins are sorted by name before exporting. Implementing this method is required.

https://github.com/godotengine/godot/blob/61598c5c88d95b96811d386cb20d714c35f4c6d7/modules/gdscript/register_types.cpp#L120 the gdscript export plugin uses GDScript.

Fixing _get_name, and running before the .gd files are remapped to .gdc, should allow this addon to work.

funnbot avatar Aug 31 '24 05:08 funnbot

Hello, thank you for your interest and this proposal!

I have already seen the method. Unfortunately, this plugin is problematic to integrate into the standard GDScript export pipeline, since GDScript reads the source file from disk. I would not like to overwrite files on disk due to the risk of data loss. It would be more correct to first implement support on the GDScript side.

The only thing that export plugin sorting allows is to forcefully skip script conversion even in binary tokens export mode.

dalexeev avatar Aug 31 '24 16:08 dalexeev

Fixed and documented in 50db3ccc371f814a828f7724064dc2e1f109ddb1. Thanks for the suggestion!

dalexeev avatar Jan 28 '25 20:01 dalexeev