1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Add support for Play Asset Delivery.

This only adds support for a subset of Play Asset Delivery: this causes a single install-time asset pack to always be present, but doesn't add support for dynamically downloaded asset packs.
This commit is contained in:
ne0fhyk
2021-09-09 19:55:42 -07:00
parent 32f8f74d83
commit 5bbfe0b5a8
8 changed files with 50 additions and 13 deletions

View File

@@ -121,7 +121,8 @@ Error store_string_at_path(const String &p_path, const String &p_data) {
// It's functionality mirrors that of the method save_apk_file.
// This method will be called ONLY when custom build is enabled.
Error rename_and_store_file_in_gradle_project(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total, const Vector<String> &p_enc_in_filters, const Vector<String> &p_enc_ex_filters, const Vector<uint8_t> &p_key) {
String dst_path = p_path.replace_first("res://", "res://android/build/assets/");
CustomExportData *export_data = (CustomExportData *)p_userdata;
String dst_path = p_path.replace_first("res://", export_data->assets_directory + "/");
print_verbose("Saving project files from " + p_path + " into " + dst_path);
Error err = store_file_at_path(dst_path, p_data);
return err;