1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Validate that Use Custom Build is enabled when Plugins are selected

Remove `GodotPayment` from the default build template
This commit is contained in:
Fredia Huya-Kouadio
2020-05-27 12:04:31 -07:00
parent 52814d111c
commit c948d25b6e
3 changed files with 12 additions and 6 deletions

View File

@@ -1823,6 +1823,15 @@ public:
err += etc_error;
}
// Ensure that `Use Custom Build` is enabled if a plugin is selected.
String enabled_plugins_names = get_plugins_names(get_enabled_plugins(p_preset));
bool custom_build_enabled = p_preset->get("custom_template/use_custom_build");
if (!enabled_plugins_names.empty() && !custom_build_enabled) {
valid = false;
err += TTR("\"Use Custom Build\" must be enabled to use the plugins.");
err += "\n";
}
r_error = err;
return valid;
}