mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Merge pull request #107600 from syntaxerror247/fix-shader_baker
Fix export fail on Android if `shader_baker` is enabled.
This commit is contained in:
commit
f3ec200507
1 changed files with 6 additions and 3 deletions
|
|
@ -244,9 +244,12 @@ void ShaderBakerExportPlugin::_end_customize_resources() {
|
|||
if (cache_list_access.is_valid()) {
|
||||
String cache_list_line;
|
||||
while (cache_list_line = cache_list_access->get_line(), !cache_list_line.is_empty()) {
|
||||
PackedByteArray cache_file_bytes = FileAccess::get_file_as_bytes(shader_cache_export_path.path_join(cache_list_line));
|
||||
if (!cache_file_bytes.is_empty()) {
|
||||
add_file(shader_cache_user_dir.path_join(cache_list_line), cache_file_bytes, false);
|
||||
// Only add if it wasn't already added.
|
||||
if (!shader_paths_processed.has(cache_list_line)) {
|
||||
PackedByteArray cache_file_bytes = FileAccess::get_file_as_bytes(shader_cache_export_path.path_join(cache_list_line));
|
||||
if (!cache_file_bytes.is_empty()) {
|
||||
add_file(shader_cache_user_dir.path_join(cache_list_line), cache_file_bytes, false);
|
||||
}
|
||||
}
|
||||
|
||||
shader_paths_processed.erase(cache_list_line);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue