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

Fix export options of scripted EditorExportPlugins #79025

Merged
merged 1 commit into from
Jul 7, 2023

Conversation

RedworkDE
Copy link
Member

Related to #78958 (comment)

Not sure what the issue @m4gr3d has was, in my testing export options that are created by scripted export plugins, didn't work at all, unless the preset was created after enabling the plugin and only until the editor is restarted.

This PR ensures that the presets are updated after enabling/disabling export plugins, so that its options show up in/disappear from existing presets. Additionally this PR preserves the values of all options, even when they no longer exist, so that disabling a plugin doesn't cause its options to be lost. There is one exception to this in secret options, which will be dropped when the option no longer exists, to prefer loosing the secret over leaking it into the normal preset file when next saving the options.

@m4gr3d
Copy link
Contributor

m4gr3d commented Jul 4, 2023

in my testing export options that are created by scripted export plugins, didn't work at all, unless the preset was created after enabling the plugin and only until the editor is restarted.

@RedworkDE The export options worked in #78958 because I've updated EditorExportPlatformAndroid::should_update_export_options() to return true when a new export plugin is detected, so at least for the Android preset, the export options from the export plugins showed up correctly.

@RedworkDE
Copy link
Member Author

Ok, then this should indeed fix your issues (And also that change detection should then no longer be necessary in your PR)

Copy link
Contributor

@m4gr3d m4gr3d left a comment

Choose a reason for hiding this comment

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

The updated logic looks good!
I'll test with #78958 to validate this fixes the issue.

@m4gr3d m4gr3d added the bug label Jul 4, 2023
@m4gr3d m4gr3d added this to the 4.2 milestone Jul 4, 2023
@m4gr3d m4gr3d added topic:plugin needs testing topic:export cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release and removed needs testing labels Jul 4, 2023
@m4gr3d
Copy link
Contributor

m4gr3d commented Jul 4, 2023

The updated logic looks good! I'll test with #78958 to validate this fixes the issue.

Tested with #78958 and it works great! Thanks for the quick fix!

@akien-mga
Copy link
Member

Thanks!

@YuriSizov YuriSizov removed the cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release label Jul 10, 2023
@YuriSizov
Copy link
Contributor

Cherry-picked for 4.1.1.

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.

4 participants