You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Swap arguments of ResourceSaver.save()
This commit is contained in:
@@ -1267,7 +1267,7 @@ Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, cons
|
||||
Ref<Resource> res = loader.get_resource();
|
||||
ERR_FAIL_COND_V(!res.is_valid(), ERR_FILE_CORRUPT);
|
||||
|
||||
return ResourceFormatSaverBinary::singleton->save(p_path, res);
|
||||
return ResourceFormatSaverBinary::singleton->save(res, p_path);
|
||||
}
|
||||
|
||||
if (ver_format > FORMAT_VERSION || ver_major > VERSION_MAJOR) {
|
||||
@@ -2204,7 +2204,7 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const Ref<Re
|
||||
return OK;
|
||||
}
|
||||
|
||||
Error ResourceFormatSaverBinary::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) {
|
||||
Error ResourceFormatSaverBinary::save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags) {
|
||||
String local_path = ProjectSettings::get_singleton()->localize_path(p_path);
|
||||
ResourceFormatSaverBinaryInstance saver;
|
||||
return saver.save(local_path, p_resource, p_flags);
|
||||
|
||||
Reference in New Issue
Block a user