From 3e971caec4e22e372f5491bc1b05bb47973c0042 Mon Sep 17 00:00:00 2001 From: betalars Date: Fri, 28 Jul 2023 20:26:19 +0200 Subject: [PATCH] Update EditorExportPlugin doc to point out pitfalls --- doc/classes/EditorExportPlugin.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/classes/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml index 169d8baa6d..69b7ca7e07 100644 --- a/doc/classes/EditorExportPlugin.xml +++ b/doc/classes/EditorExportPlugin.xml @@ -4,8 +4,8 @@ A script that is executed when exporting the project. - [EditorExportPlugin]s are automatically invoked whenever the user exports the project. Their most common use is to determine what files are being included in the exported project. For each plugin, [method _export_begin] is called at the beginning of the export process and then [method _export_file] is called for each exported file. - To use [EditorExportPlugin], register it using the [method EditorPlugin.add_export_plugin] method first. + [EditorExportPlugin]s are automatically invoked whenever the user exports the project. They can be used to modify scenes and resources during project export based on what [url=$DOCS_URL/tutorials/export/feature_tags.html]Feature Tags[/url] are set. For each plugin, [method _export_begin] is called at the beginning of the export process and then [method _export_file] is called for each exported file. + Register a [EditorExportPlugin] by creating a new [EditorPlugin] and calling its [method EditorPlugin.add_export_plugin] method. $DOCS_URL/tutorials/platform/android/android_plugin.html @@ -54,6 +54,7 @@ Customize a scene. If changes are made to it, return the same or a new scene. Otherwise, return [code]null[/code]. If a new scene is returned, it is up to you to dispose of the old one. Implementing this method is required if [method _begin_customize_scenes] returns [code]true[/code]. + [b]Note:[/b] To change a variable in your scene, use the [code]@export[/code] annotation when declaring it. @@ -166,6 +167,7 @@ Return a hash based on the configuration passed (for both scenes and resources). This helps keep separate caches for separate export configurations. Implementing this method is required if [method _begin_customize_resources] returns [code]true[/code]. + [b]Note:[/b] [method _customize_resource] and [method _customize_scene] will not be called when the [EditorExportPlugin] script is modified unless this hash changes too.