summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMatthew <matthewehr@hotmail.com>2022-09-21 19:15:44 -0400
committerGitHub <noreply@github.com>2022-09-21 19:15:44 -0400
commit4ea2703eee414195c427cb4eb2708672679b8fe8 (patch)
tree3d9db1c5d4336cecedf9b9644d727703c5c5349a /doc
parent0b06f8b0bda45fcea3e4b6ba9e7168d6b680c769 (diff)
parent1acd0f1bab97bb6641186e829fd6155c85378f42 (diff)
Merge pull request #66230 from Evanaellio/swap-resourcesaver-save-arguments
Swap arguments of ResourceSaver.save()
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/EditorImportPlugin.xml4
-rw-r--r--doc/classes/PackedScene.xml4
2 files changed, 4 insertions, 4 deletions
diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml
index 348347c4ef..86db626935 100644
--- a/doc/classes/EditorImportPlugin.xml
+++ b/doc/classes/EditorImportPlugin.xml
@@ -44,7 +44,7 @@
# Fill the Mesh with data read in "file", left as an exercise to the reader.
var filename = save_path + "." + _get_save_extension()
- return ResourceSaver.save(filename, mesh)
+ return ResourceSaver.save(mesh, filename)
[/gdscript]
[csharp]
using Godot;
@@ -103,7 +103,7 @@
var mesh = new ArrayMesh();
// Fill the Mesh with data read in "file", left as an exercise to the reader.
String filename = savePath + "." + GetSaveExtension();
- return (int)ResourceSaver.Save(filename, mesh);
+ return (int)ResourceSaver.Save(mesh, filename);
}
}
[/csharp]
diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml
index 97595a6984..7ca1d5d60d 100644
--- a/doc/classes/PackedScene.xml
+++ b/doc/classes/PackedScene.xml
@@ -41,7 +41,7 @@
# Only `node` and `body` are now packed.
var result = scene.pack(node)
if result == OK:
- var error = ResourceSaver.save("res://path/name.tscn", scene) # Or "user://..."
+ var error = ResourceSaver.save(scene, "res://path/name.tscn") # Or "user://..."
if error != OK:
push_error("An error occurred while saving the scene to disk.")
[/gdscript]
@@ -63,7 +63,7 @@
Error result = scene.Pack(node);
if (result == Error.Ok)
{
- Error error = ResourceSaver.Save("res://path/name.tscn", scene); // Or "user://..."
+ Error error = ResourceSaver.Save(scene, "res://path/name.tscn"); // Or "user://..."
if (error != Error.Ok)
{
GD.PushError("An error occurred while saving the scene to disk.");