EditorExportPlugin docs: Workaround for #94045. Describes behaviour of customizing texture resources.

The list of types that should not be both customized and skipped was created through trial-and-error with the following import types:

- AnimationLibrary
- BitMap
- Translation
- CompressedCubemap
- CompressedCubemapArray
- FontFile
- FontFile
- FontFile
- RDShaderFile
- Image
- AudioStreamMP3
- AudioStreamWAV
- ArrayMesh
- PackedScene
- CompressedTexture2D
- CompressedTexture2DArray
- CompressedTexture3D
- AtlasTexture
- AudioStreamOggVorbis

The reason `skip()` should not be called is because the original resource will now point to the `.ctex` (or equivalent) file of the resource that replaced it. In this scenario, the `.ctex` file that was initially referenced by the original resource will no longer be included in the project.

Co-authored-by: Tomek <kobewi4e@gmail.com>
This commit is contained in:
Allen Pestaluky 2024-07-08 13:55:38 -04:00
parent 76a135926a
commit c6e994bf6d
1 changed files with 9 additions and 2 deletions

View File

@ -34,9 +34,16 @@
<param index="0" name="resource" type="Resource" /> <param index="0" name="resource" type="Resource" />
<param index="1" name="path" type="String" /> <param index="1" name="path" type="String" />
<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]. When a new resource is returned, [param resource] will be replaced by a copy of the new resource.
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 [param path] 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]. Implementing this method is required if [method _begin_customize_resources] returns [code]true[/code].
[b]Note:[/b] When customizing any of the following types and returning another resource, the other resource should not be skipped using [method skip] in [method _export_file]:
- [AtlasTexture]
- [CompressedCubemap]
- [CompressedCubemapArray]
- [CompressedTexture2D]
- [CompressedTexture2DArray]
- [CompressedTexture3D]
</description> </description>
</method> </method>
<method name="_customize_scene" qualifiers="virtual"> <method name="_customize_scene" qualifiers="virtual">