Skip to content
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

Update export preset options overrides before doing "Remote Debug" #101658

Merged

Conversation

dsnopek
Copy link
Contributor

@dsnopek dsnopek commented Jan 16, 2025

When doing an export any other way, it's already updating the export preset options before doing it.

For example, via the "Export PCK/ZIP..." or "Export Project..." buttons:

current->update_value_overrides();

Or, via the "Export All..." button:

preset->update_value_overrides();

But before this PR, it's not doing it before export when using the "Remote Debug" button (aka "One click deploy"). If you've got an export plugin that sets overrides that depend on project or editor settings, this will mean that your settings won't be in effect when using the "Remote Debug" button.

This PR fixes that!

Copy link
Member

@bruvzg bruvzg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's always done for export, but with some export plugins start_run_native can trigger actions that not involve export (like, starting/stopping server). It's probably still OK to update preset in these cases.

@dsnopek
Copy link
Contributor Author

dsnopek commented Jan 17, 2025

It's always done for export, but with some export plugins start_run_native can trigger actions that not involve export (like, starting/stopping server). It's probably still OK to update preset in these cases.

Yeah, it should be harmless: it's just looping over EditorExportPlugins and updating a Dictionary.

However, if any actions get values from the preset - even if they don't do an export - it would still be important to update the options overrides. I don't see any cases of that at the moment, but EditorExportPlatform::run() is passed the preset, so folks writing code in there are going to assume that the preset has all the correct option values on it.

@Repiteo Repiteo merged commit 1b7b009 into godotengine:master Jan 20, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Jan 20, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants