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

Implement sparse bundle PCK support.

This commit is contained in:
Pāvels Nadtočajevs
2025-02-20 11:08:16 +02:00
committed by Rémi Verschelde
parent d89f4ab32f
commit 42733a2a5c
11 changed files with 351 additions and 146 deletions

View File

@@ -614,6 +614,8 @@ void ProjectSettings::_convert_to_last_version(int p_from_version) {
* appending '.pck' to the binary name (e.g. 'linux_game' -> 'linux_game.pck').
* o PCK with the same basename as the binary in the current working directory.
* Same as above for the two possible PCK file names.
* - On Android, look for 'assets.sparsepck' and try loading it, if it doesn't work,
* proceed to the next step.
* - On relevant platforms (Android/iOS), lookup project file in OS resource path.
* If found, load it or fail.
* - Lookup project file in passed `p_path` (--path passed by the user), i.e. we
@@ -701,6 +703,11 @@ Error ProjectSettings::_setup(const String &p_path, const String &p_main_pack, b
}
}
#ifdef ANDROID_ENABLED
// Attempt to load sparse PCK assets.
_load_resource_pack("res://assets.sparsepck", false, 0, true);
#endif
// Try to use the filesystem for files, according to OS.
// (Only Android -when reading from pck- and iOS use this.)