The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

+1 vote

I'm trying to streamline the process of compiling my game and I have a bash script that I want to run just before I compile the game.

It's this possible with Godot as-is? If not, would create an EditorPlugin be the best way to achieve this?

As a workaround I may create a script that uses Godot Headless to compile, but this is only useful for production unless there is a way to deploy to Android with the debugger connected through the command line.

I am using a custom Android Build with plugins, if it's useful.

Godot version v3.3.4
in Engine by (30 points)

1 Answer

0 votes
Best answer

Editor plugins is the answer here. I finally solved it by creating an EditorPlugin with a EditorExportPlugin.

First, the method EditorPlugin.build() when running the game from the editor and when using one-click deploy for Android.

Second, EditorExportPlugin.exportbegin() is called when exporting.

So using both methods to call the script is pretty simple and covers all the cases.

by (30 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.