Describe the project you are working on:
We are working on an open source remake of an old game. We use extracted sprites of the game inside the engine. We are not allowed to redistribute the files, thats why we remove the image content and created a system, which extracts the images when the game starts and loads them into godot.
Describe the problem or limitation you are having in your project:
Our system works fine, but its tedious to clear the images outside of godot in preparation of an export.
Describe how this feature / enhancement will help you overcome this problem or limitation:
It would be more elegant, if we were able to let godot run a gd or C# script before it starts the export process. A feature like Unity has for example.
Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:
Describe implementation detail for your proposal (in code), if possible:
Godot could call a function inside a "Callback" class. We could just inherit that class and override the callback functions for pre and post export.
If this enhancement will not be used often, can it be worked around with a few lines of script?:
I don't see a real why of how we could achieve this inside of godot
Is there a reason why this should be core and not an add-on in the asset library?:
Its an addition to the export process
You might be looking at _export_begin and _export_end callbacks in EditorExportPlugin, I haven't used that myself though.
For some reason _export_end doesn't seem to appear in 3.1 documentation despite being added in godotengine/godot#23693.
Looks like this class needs some documentation.
Looks like its missing in the mono implementation. EditorExportPlugin is not found in the Godot namespace. Its also not working with GDScript. This script does not produce any output in version 3.1.1 Mono
extends EditorExportPlugin
func _export_begin(features, is_debug, path, flags):
print(flags)
print("Hello!")
Most helpful comment
Looks like this class needs some documentation.