Skip to content

Commit de647f6

Browse files
committed
Add export option warning for web plugin
1 parent fcf8bc6 commit de647f6

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

src/editor/sentry_editor_export_plugin_web.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,13 @@ void SentryEditorExportPluginWeb::_export_begin(const PackedStringArray &p_featu
6969
dir->list_dir_end();
7070
}
7171

72+
String SentryEditorExportPluginWeb::_get_export_option_warning(const Ref<EditorExportPlatform> &p_platform, const String &p_option) const {
73+
if (p_option == "variant/extensions_support" && get_option("variant/extensions_support") == Variant(false)) {
74+
return "Sentry requires \"Extension Support\" to be enabled for Web exports.";
75+
}
76+
return String();
77+
}
78+
7279
SentryEditorExportPluginWeb::SentryEditorExportPluginWeb() {
7380
project_js_files_path = "res://addons/sentry/web/";
7481

src/editor/sentry_editor_export_plugin_web.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class SentryEditorExportPluginWeb : public EditorExportPlugin {
2222
virtual String _get_name() const override;
2323
virtual bool _supports_platform(const Ref<EditorExportPlatform> &p_platform) const override;
2424
virtual void _export_begin(const PackedStringArray &p_features, bool p_is_debug, const String &p_path, uint32_t p_flags) override;
25+
virtual String _get_export_option_warning(const Ref<EditorExportPlatform> &p_platform, const String &p_option) const override;
2526

2627
SentryEditorExportPluginWeb();
2728
};

0 commit comments

Comments
 (0)