Skip to content

Commit

Permalink
Merge pull request #95335 from esainane/error-to-sender
Browse files Browse the repository at this point in the history
Fix documentation of `EditorImportPlugin._Import`
  • Loading branch information
akien-mga committed Aug 12, 2024
2 parents 4ab4613 + 58e3500 commit 1d7b318
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/classes/EditorImportPlugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,18 @@
};
}

public override int _Import(string sourceFile, string savePath, Godot.Collections.Dictionary options, Godot.Collections.Array<string> platformVariants, Godot.Collections.Array<string> genFiles)
public override Error _Import(string sourceFile, string savePath, Godot.Collections.Dictionary options, Godot.Collections.Array<string> platformVariants, Godot.Collections.Array<string> genFiles)
{
using var file = FileAccess.Open(sourceFile, FileAccess.ModeFlags.Read);
if (file.GetError() != Error.Ok)
{
return (int)Error.Failed;
return Error.Failed;
}

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(mesh, filename);
return ResourceSaver.Save(mesh, filename);
}
}
[/csharp]
Expand Down

0 comments on commit 1d7b318

Please sign in to comment.