diff options
Diffstat (limited to 'doc/classes/EditorImportPlugin.xml')
-rw-r--r-- | doc/classes/EditorImportPlugin.xml | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml index d3af6c1269..c395815117 100644 --- a/doc/classes/EditorImportPlugin.xml +++ b/doc/classes/EditorImportPlugin.xml @@ -9,7 +9,7 @@ Below is an example EditorImportPlugin that imports a [Mesh] from a file with the extension ".special" or ".spec": [codeblocks] [gdscript] - tool + @tool extends EditorImportPlugin func _get_importer_name(): @@ -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] @@ -115,7 +115,7 @@ </tutorials> <methods> <method name="_get_import_options" qualifiers="virtual const"> - <return type="Array" /> + <return type="Dictionary[]" /> <param index="0" name="path" type="String" /> <param index="1" name="preset_index" type="int" /> <description> @@ -214,10 +214,10 @@ <param index="0" name="source_file" type="String" /> <param index="1" name="save_path" type="String" /> <param index="2" name="options" type="Dictionary" /> - <param index="3" name="platform_variants" type="Array" /> - <param index="4" name="gen_files" type="Array" /> + <param index="3" name="platform_variants" type="String[]" /> + <param index="4" name="gen_files" type="String[]" /> <description> - Imports [code]source_file[/code] into [code]save_path[/code] with the import [code]options[/code] specified. The [code]platform_variants[/code] and [code]gen_files[/code] arrays will be modified by this function. + Imports [param source_file] into [param save_path] with the import [param options] specified. The [param platform_variants] and [param gen_files] arrays will be modified by this function. This method must be overridden to do the actual importing work. See this class' description for an example of overriding this method. </description> </method> |