Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix documentation of EditorImportPlugin._Import #95335

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading