A simple metadata based plugin to export additional files to your final exe directory, outside of the PCK Useful for things like not having to copy/paste external scripts or icon files that you want to export with your game. Not limited by file type etc.
If this saves you a little time, buy me a coffee.
1.Drag and drop the addons folder into your main res:// folder 2. Goto Project Settings>Plugins 3. Enable the "Export Dependencies" plugin 4. Restart your editor
- In your addons/export_extras folder double click on the res://addons/export_extras/export_plugin.gd
- Expand the "Metadata" panel in the inspector.
- Click on "Array Size" for either Directories To Add or Files to Add.
- Either add to the array size or click "Add Element".
- Change the item type (pencil icon on the right) to "String" for each element you add.
- For Folders: Copy/Paste the folder path res://path/to/your/folder/ make sure to include the trailing / to get all contents of it.
- For Files: Copy/Paste the direct path res://path/to/your/file.extension.
- Export your game, you can choose to exclude these files in your resources if you don't want copies in the PCK.
I only tested and made this in Godot 4.2 but feel free to fork it to other versions.
- A new "export_plugin_settings.json" file will be created in your "res://addons/export_extras" folder on initial load with placeholders
- Metadata will be set for the export_plugin.gd resource from this file
- Edit the metadata as you wish
- Changes will be saved on exit of the editor to the same Json file