mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Swap arguments of ResourceSaver.save()
This commit is contained in:
parent
ba3734e69a
commit
c3606cb5f3
57 changed files with 97 additions and 99 deletions
|
@ -195,9 +195,9 @@ void EditorResourcePreview::_generate_preview(Ref<ImageTexture> &r_texture, Ref<
|
|||
if (r_texture.is_valid()) {
|
||||
//wow it generated a preview... save cache
|
||||
bool has_small_texture = r_small_texture.is_valid();
|
||||
ResourceSaver::save(cache_base + ".png", r_texture);
|
||||
ResourceSaver::save(r_texture, cache_base + ".png");
|
||||
if (has_small_texture) {
|
||||
ResourceSaver::save(cache_base + "_small.png", r_small_texture);
|
||||
ResourceSaver::save(r_small_texture, cache_base + "_small.png");
|
||||
}
|
||||
Ref<FileAccess> f = FileAccess::open(cache_base + ".txt", FileAccess::WRITE);
|
||||
ERR_FAIL_COND_MSG(f.is_null(), "Cannot create file '" + cache_base + ".txt'. Check user write permissions.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue