Make build profile project detection also set build options

This commit is contained in:
Michael Alexsander 2025-03-06 15:42:10 -03:00
parent e45cc68092
commit 454e4f817c
No known key found for this signature in database
GPG key ID: A9C91EE110F4EABA
28 changed files with 786 additions and 82 deletions

View file

@ -9,6 +9,25 @@
<tutorials>
<link title="Import plugins">$DOCS_URL/tutorials/plugins/editor/import_plugins.html</link>
</tutorials>
<methods>
<method name="_get_build_dependencies" qualifiers="virtual const">
<return type="PackedStringArray" />
<param index="0" name="path" type="String" />
<description>
Called when the engine compilation profile editor wants to check what build options an imported resource needs. For example, [ResourceImporterDynamicFont] has a property called [member ResourceImporterDynamicFont.multichannel_signed_distance_field], that depends on the engine to be build with the "msdfgen" module. If that resource happened to be a custom one, it would be handled like this:
[codeblock]
func _get_build_dependencies(path):
var resource = load(path)
var dependencies = PackedStringArray()
if resource.multichannel_signed_distance_field:
dependencies.push_back("module_msdfgen_enabled")
return dependencies
[/codeblock]
</description>
</method>
</methods>
<constants>
<constant name="IMPORT_ORDER_DEFAULT" value="0" enum="ImportOrder">
The default import order.