From 754db65a1f7ab3bf1d10387134600a44f9d1f93b Mon Sep 17 00:00:00 2001 From: ne0fhyk Date: Mon, 11 Oct 2021 08:02:03 -0700 Subject: [PATCH] Pass the correct `export_format` argument to locate the assets directory when exporting. (cherry picked from commit 431ccdb057b3b712372bcea49b28273d469e0d97) --- platform/android/export/export_plugin.cpp | 7 +++---- platform/android/export/export_plugin.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp index 4c5205ea54f..678d60a54a3 100644 --- a/platform/android/export/export_plugin.cpp +++ b/platform/android/export/export_plugin.cpp @@ -433,9 +433,8 @@ String EditorExportPlatformAndroid::get_package_name(const String &p_package) co return pname; } -String EditorExportPlatformAndroid::get_assets_directory(const Ref &p_preset) const { - int export_format = int(p_preset->get("custom_template/export_format")); - return export_format == EXPORT_FORMAT_AAB ? AAB_ASSETS_DIRECTORY : APK_ASSETS_DIRECTORY; +String EditorExportPlatformAndroid::get_assets_directory(const Ref &p_preset, int p_export_format) const { + return p_export_format == EXPORT_FORMAT_AAB ? AAB_ASSETS_DIRECTORY : APK_ASSETS_DIRECTORY; } bool EditorExportPlatformAndroid::is_package_name_valid(const String &p_package, String *r_error) const { @@ -2808,7 +2807,7 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref &p_preset) const; + String get_assets_directory(const Ref &p_preset, int p_export_format) const; bool is_package_name_valid(const String &p_package, String *r_error = nullptr) const;