Merge pull request #74038 from KoBeWi/DocumentationExportPlugin

Improve documentation of EditorExportPlugin
This commit is contained in:
Rémi Verschelde 2023-02-27 13:51:02 +01:00
commit 3379d731d5
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -15,7 +15,8 @@
<param index="0" name="platform" type="EditorExportPlatform" /> <param index="0" name="platform" type="EditorExportPlatform" />
<param index="1" name="features" type="PackedStringArray" /> <param index="1" name="features" type="PackedStringArray" />
<description> <description>
Return true if this plugin will customize resources based on the platform and features used. Return [code]true[/code] if this plugin will customize resources based on the platform and features used.
When enabled, [method _get_customization_configuration_hash], [method _customize_resource] and [method _customize_scene] will be called and must be implemented.
</description> </description>
</method> </method>
<method name="_begin_customize_scenes" qualifiers="virtual const"> <method name="_begin_customize_scenes" qualifiers="virtual const">
@ -33,6 +34,7 @@
<description> <description>
Customize a resource. If changes are made to it, return the same or a new resource. Otherwise, return [code]null[/code]. Customize a resource. If changes are made to it, return the same or a new resource. Otherwise, return [code]null[/code].
The [i]path[/i] argument is only used when customizing an actual file, otherwise this means that this resource is part of another one and it will be empty. The [i]path[/i] argument is only used when customizing an actual file, otherwise this means that this resource is part of another one and it will be empty.
Implementing this method is required if [method _begin_customize_resources] returns [code]true[/code].
</description> </description>
</method> </method>
<method name="_customize_scene" qualifiers="virtual"> <method name="_customize_scene" qualifiers="virtual">
@ -41,6 +43,7 @@
<param index="1" name="path" type="String" /> <param index="1" name="path" type="String" />
<description> <description>
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. 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_resources] returns [code]true[/code].
</description> </description>
</method> </method>
<method name="_end_customize_resources" qualifiers="virtual"> <method name="_end_customize_resources" qualifiers="virtual">
@ -85,6 +88,7 @@
<return type="int" /> <return type="int" />
<description> <description>
Return a hash based on the configuration passed (for both scenes and resources). This helps keep separate caches for separate export configurations. 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].
</description> </description>
</method> </method>
<method name="_get_export_features" qualifiers="virtual const"> <method name="_get_export_features" qualifiers="virtual const">
@ -98,7 +102,8 @@
<method name="_get_name" qualifiers="virtual const"> <method name="_get_name" qualifiers="virtual const">
<return type="String" /> <return type="String" />
<description> <description>
Return the name identifier of this plugin (for future identification by the exporter). Return the name identifier of this plugin (for future identification by the exporter). The plugins are sorted by name before exporting.
Implementing this method is required.
</description> </description>
</method> </method>
<method name="add_file"> <method name="add_file">