You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #101954 from bruvzg/uid_deref
[Export] Convert `uid://` names to `res://` when exporting files.
This commit is contained in:
@@ -803,7 +803,12 @@ Error EditorExportPlatformAndroid::save_apk_so(void *p_userdata, const SharedObj
|
||||
|
||||
Error EditorExportPlatformAndroid::save_apk_file(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, uint64_t p_seed) {
|
||||
APKExportData *ed = static_cast<APKExportData *>(p_userdata);
|
||||
const String path = ResourceUID::ensure_path(p_path);
|
||||
|
||||
String path = p_path.simplify_path();
|
||||
if (path.begins_with("uid://")) {
|
||||
path = ResourceUID::uid_to_path(path).simplify_path();
|
||||
print_verbose(vformat(R"(UID referenced exported file name "%s" was replaced with "%s".)", p_path, path));
|
||||
}
|
||||
const String dst_path = path.replace_first("res://", "assets/");
|
||||
|
||||
store_in_apk(ed, dst_path, p_data, _should_compress_asset(path, p_data) ? Z_DEFLATED : 0);
|
||||
|
||||
Reference in New Issue
Block a user