From c31746fdcf546b1eb5f697647973adc7f75e266f Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Thu, 15 May 2025 19:46:15 +0800 Subject: [PATCH] Document output parameters of `EditorImportPlugin.import` --- doc/classes/EditorImportPlugin.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml index 717b4765e5..9bb4a61b19 100644 --- a/doc/classes/EditorImportPlugin.xml +++ b/doc/classes/EditorImportPlugin.xml @@ -237,7 +237,9 @@ - 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. + Imports [param source_file] with the import [param options] specified. Should return [constant @GlobalScope.OK] if the import is successful, other values indicate failure. + The imported resource is expected to be saved to [code]save_path + "." + _get_save_extension()[/code]. If a different variant is preferred for a [url=$DOCS_URL/tutorials/export/feature_tags.html]feature tag[/url], save the variant to [code]save_path + "." + tag + "." + _get_save_extension()[/code] and add the feature tag to [param platform_variants]. + If additional resource files are generated in the resource filesystem ([code]res://[/code]), add their full path to [param gen_files] so that the editor knows they depend on [param source_file]. This method must be overridden to do the actual importing work. See this class' description for an example of overriding this method.