From 58e3500010a660f79e02a956c352f41d30145459 Mon Sep 17 00:00:00 2001 From: Sai Nane Date: Fri, 9 Aug 2024 16:05:58 +0000 Subject: [PATCH] Fix documentation of `EditorImportPlugin._Import` The following is the currently generated `EditorImportPlugin.cs`: ```csharp public virtual Error _Import(string sourceFile, string savePath, Dictionary options, Array platformVariants, Array genFiles) { return Error.Ok; } ``` This fixes the type signature in the documentation's example to match the actual type signature. --- doc/classes/EditorImportPlugin.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml index 88a6eeec268b..fb9316d17027 100644 --- a/doc/classes/EditorImportPlugin.xml +++ b/doc/classes/EditorImportPlugin.xml @@ -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]