You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-17 14:11:06 +00:00
Allow adding custom export platforms using scripts / GDExtension.
This commit is contained in:
@@ -48,6 +48,14 @@ Ref<EditorExportPreset> EditorExportPlugin::get_export_preset() const {
|
||||
return export_preset;
|
||||
}
|
||||
|
||||
Ref<EditorExportPlatform> EditorExportPlugin::get_export_platform() const {
|
||||
if (export_preset.is_valid()) {
|
||||
return export_preset->get_platform();
|
||||
} else {
|
||||
return Ref<EditorExportPlatform>();
|
||||
}
|
||||
}
|
||||
|
||||
void EditorExportPlugin::add_file(const String &p_path, const Vector<uint8_t> &p_file, bool p_remap) {
|
||||
ExtraFile ef;
|
||||
ef.data = p_file;
|
||||
@@ -321,6 +329,9 @@ void EditorExportPlugin::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("skip"), &EditorExportPlugin::skip);
|
||||
ClassDB::bind_method(D_METHOD("get_option", "name"), &EditorExportPlugin::get_option);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_export_preset"), &EditorExportPlugin::get_export_preset);
|
||||
ClassDB::bind_method(D_METHOD("get_export_platform"), &EditorExportPlugin::get_export_platform);
|
||||
|
||||
GDVIRTUAL_BIND(_export_file, "path", "type", "features");
|
||||
GDVIRTUAL_BIND(_export_begin, "features", "is_debug", "path", "flags");
|
||||
GDVIRTUAL_BIND(_export_end);
|
||||
|
||||
Reference in New Issue
Block a user